Online example
Does not work:
const styles = {
container: {
padding: props => props.active ? 10 : 20,
'@media screen and (min-width: 100px)': {
color: 'red',
background: props => (props.active ? 'white' : 'gray')
}
}
}
const sheet = jss.createStyleSheet(styles, {link: true}).attach()
sheet.update({active: false})
Works:
const styles = {
container: {
padding: props => props.active ? 10 : 20,
'@media screen and (min-width: 100px)': {
color: 'red',
background: props => (props.active ? 'white' : 'gray')
}
}
}
const sheet = jss.createStyleSheet(styles, {link: true})
sheet.update({active: false}).attach()
Online example
Does not work:
Works: