A
Size: a a a
A
DS
IT
IT
🦉
IT
IT
🦉
🦉
IT
IT
l
const appConfig = createStore(null)
const quizColor = appConfig.map(config => {
if (config) return config.quizcolor
return null
})
const Button = styled.button`
color: var(--quizColor, currentColor);
`
const Panel = () => (
<div style={{'--quizColor': useStore(quizColor)}}>
<Button>close panel</Button>
</div>
)
l
IT
IT
l
l
l
l
const Button = styled.button`
color: ${({color}) => color};
`
const QuizButton = props => (
<Button color={useStore(quizColor)} {...props} />
)