styled -components提供 <ThemeProvider> 来支持主题模式,底层实现是用React的context ... 使用props.theme获取到主题 const Button = styled.button` font-size: 1em; ...
確定! 回上一頁