File tree 2 files changed +2
-3
lines changed 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -334,7 +334,7 @@ export default class Headroom extends Component {
334
334
}
335
335
336
336
render ( ) {
337
- const { className : userClassName , ...divProps } = this . props
337
+ const { className : userClassName , tag : Tag , ...divProps } = this . props
338
338
delete divProps . onUnpin
339
339
delete divProps . onPin
340
340
delete divProps . onUnfix
@@ -395,8 +395,6 @@ export default class Headroom extends Component {
395
395
? `${ userClassName } headroom-wrapper`
396
396
: 'headroom-wrapper'
397
397
398
- const { tag : Tag } = this . props
399
-
400
398
return (
401
399
< Tag style = { wrapperStyles } className = { wrapperClassName } >
402
400
< div
Original file line number Diff line number Diff line change @@ -76,3 +76,4 @@ Another option is to use CSS. The component has a `headroom` class as well as a
76
76
* ` wrapperStyle ` — pass styles for the wrapper div (this maintains the components vertical space at the top of the page).
77
77
* ` parent ` — provide a custom 'parent' element for scroll events. ` parent ` should be a function which resolves to the desired element.
78
78
* ` pinStart ` — height in px where the header should start and stop pinning. Useful when you have another element above Headroom component.
79
+ * ` tag ` - change the wrapper with the tag of your choice.
You can’t perform that action at this time.
0 commit comments