I have a Drawer component that is wrapped using withStyles and overrides some values on the anchorLeft className.
<Drawer anchor="left" classes={{paper: this.props.classes.paper, anchorLeft: this.props.classes.anchorLeft}} ...>
I have some other parts of the app that can effect the top
value that needs to be passed to anchorLeft
. I am using redux so the top value is being passed through the redux store and sent to my Drawer component through props, so I need a way in the component to effect the anchorLeft top value.
What's the preferred way to do dynamic styling inside the component and change the values in the JSS style sheet? Is there a way to use the JSS sheet.update() and get access to the sheet that way? http://cssinjs.org/json-api?v=v9.0.0-pre.3#function-values
I assume you are using react-jss or styled-jss, in both cases you can use function values and you receive props there already.