styled-components, theme
551 ワード
1. theme
1-1.make styled.jsexport const lightTheme = {
mainBgColor: 'tomato',
textColor: '#1e272e',
accentColor: 'yellow'
}
export const darkTheme = {
mainBgColor:'#1e272e',
textColor: '#d2dae2',
accentColor: 'yellow'
}
1-2. use
in App.js
36日、47日から52日までは長い間見なければなりません.
使用!
background-color:${props=> props.theme.mainBgColor}
Reference
この問題について(styled-components, theme), 我々は、より多くの情報をここで見つけました
https://velog.io/@jinyinshu/styled-components-theme
テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol
export const lightTheme = {
mainBgColor: 'tomato',
textColor: '#1e272e',
accentColor: 'yellow'
}
export const darkTheme = {
mainBgColor:'#1e272e',
textColor: '#d2dae2',
accentColor: 'yellow'
}
Reference
この問題について(styled-components, theme), 我々は、より多くの情報をここで見つけました https://velog.io/@jinyinshu/styled-components-themeテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol