You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importReact,{Component}from'react';importstyledfrom'styled-components';constTitle=styled.h1` font-size: 18px; text-align: center; color: palevioletred;`constWrapper=styled.div` padding: 24px;`exportdefaultclassStyledComponentsextendsComponent{render(){return(<Wrapper><Title>This is my first styled-component!</Title></Wrapper>)}}
概览
props
调整组件样式attrs
封装组件属性extend
或者styled(Component)
实现组件样式继承innerRef
代替ref
ThemeProvider
helper实现主题功能keyframes
helper实现动画界面injectGlobal
设置全局样式基础用法
props
调整组件样式attrs
封装组件属性extend
或者styled(Component)
实现组件样式继承使用
innerRef
代替ref
ThemeProvider
helper实现主题功能非styled-components组件使用theme(主题)
keyframes
helper实现动画界面injectGlobal
设置全局样式The text was updated successfully, but these errors were encountered: