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 22
33* The ` onBeforeChange ` callback now receives the ` nextElement ` as second parameter.
44* Add missing ` updateStepElement() ` to the TypeScript type declarations.
5+ * Fix Steps's ` element ` parameter type to also accept an ` HTMLElement ` .
56
67## 0.5.0
78
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ declare module 'intro.js-react' {
44
55 interface Step {
66 /**
7- * CSS selector to use for the step.
7+ * CSS selector or element to use for the step.
88 */
9- element ?: string ;
9+ element ?: string | HTMLElement | Element ;
1010 /**
1111 * The tooltip content.
1212 */
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default class Steps extends Component {
1919 initialStep : PropTypes . number . isRequired ,
2020 steps : PropTypes . arrayOf (
2121 PropTypes . shape ( {
22- element : PropTypes . string ,
22+ element : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . instanceOf ( Element ) ] ) ,
2323 intro : PropTypes . node . isRequired ,
2424 position : introJsPropTypes . tooltipPosition ,
2525 tooltipClass : PropTypes . string ,
You can’t perform that action at this time.
0 commit comments