digitalfabrik/react-sticky-headroom

Pass additional styling

Closed this issue · 2 comments

Hey!

Great component, just what I was looking for! Due to some complicated layouting in my current project it would be great to be able to set className or just pass additional styling to HeaderWrapper. I'm not super experienced with styled-components, so maybe it's possible already?

Hi @intelligence !
Thanks for your input. Indeed, changing the style of HeaderWrapper is not (yet) possible.

Just out of curiosity: What kind of layouting problems do you have?
Depending on your setup, it might be easier to use a wrapper component and adjust the layout there.
But this might also introduce problems with the sticky-ness of some elements.

I'm only a bit hesitant in letting HeaderWrapper be customizable, as it has a quite complex layout behavior itself, so customizing could cause more errors than it might solve.

I'm working on an app that has a bit complex hierarchy of elements. I needed to add an higher z-index value and also set pointer-events: none; on the HeaderWrapper and enable them on a element basis within the header.

I'm just now revisiting the project again so I don't remember all the details. Think I tried with a wrapper but ran into other issues.