I\'m using styled-components to build my components. All style properties which accept custom values are reused throughout my components (as it should be). With that in mind
Wrapping a around your application may help:
https://www.styled-components.com/docs/advanced#theming
const theme = {
fontColour: 'purple'
}
render() {
return (
)
}
That will give all child styled-components access to the theme like so:
const MyApplication = styled.section`
color: ${props => props.theme.fontColour}
`
Or
const MyFancyButton = styled.button`
background: ${props => props.theme.fontColour}
`
Or access the theme via https://www.styled-components.com/docs/advanced#getting-the-theme-without-styled-components