fela-react-prop
fela
helper that accepts a style rule and a property. it returns a function that accepts a component, that gets the generated style classnames applied as a property.
Installation
yarn add fela-react-prop
Usage
// apply the style classes generated for a style rule to the "propName"// property of the wrapped component (WrappedComponent).const StyledLink =
Use Cases
Link
react-router Set default and active styles of Link
component from react-router
.
// apply the style classes generated for a style rule to the "activeClassName"// property of the wrapped component (NavLink).const StyledLink = `
Sticky
react-sticky Set default and sticky styles of Sticky
component from react-sticky
.
// apply the style classes generated for a style rule to the "stickyClassName"// property of the wrapped component (Sticky).const StyledLink = `