File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
* The ` onBeforeChange ` callback now receives the ` nextElement ` as second parameter.
4
4
* Add missing ` updateStepElement() ` to the TypeScript type declarations.
5
+ * Fix Steps's ` element ` parameter type to also accept an ` HTMLElement ` .
5
6
6
7
## 0.5.0
7
8
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ declare module 'intro.js-react' {
4
4
5
5
interface Step {
6
6
/**
7
- * CSS selector to use for the step.
7
+ * CSS selector or element to use for the step.
8
8
*/
9
- element ?: string ;
9
+ element ?: string | HTMLElement | Element ;
10
10
/**
11
11
* The tooltip content.
12
12
*/
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default class Steps extends Component {
19
19
initialStep : PropTypes . number . isRequired ,
20
20
steps : PropTypes . arrayOf (
21
21
PropTypes . shape ( {
22
- element : PropTypes . string ,
22
+ element : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . instanceOf ( Element ) ] ) ,
23
23
intro : PropTypes . node . isRequired ,
24
24
position : introJsPropTypes . tooltipPosition ,
25
25
tooltipClass : PropTypes . string ,
You can’t perform that action at this time.
0 commit comments