Pra*_*tha 5 materialize reactjs react-native material-ui
根据 material-ui 中的文档,它在组件之间提供空间。但我可以在这里得到它的高度和宽度:
width: theme.spacing(20),
height: theme.spacing(15)
Run Code Online (Sandbox Code Playgroud)
theme.spacing()这里的宽度和高度是如何设置的?
小智 11
const theme = createMuiTheme({
spacing: 8,
});
Run Code Online (Sandbox Code Playgroud)
定义主题后,您就有了间距值。默认情况下,此值为8px。因此,当您调用 时theme.spacing(20),如果spacing value是,8则简单地返回20 * 8=> 160px。
来源:https : //material-ui.com/customization/spacing/
| 归档时间: |
|
| 查看次数: |
5306 次 |
| 最近记录: |