OneScript

foregroundStyle

设置可继承的前景形状样式。

foregroundStyle(style) 为视图及其后代设置可继承的 ShapeStyle。

import { Modifier, ShapeStyle, Text } from "onescript/views"

<Text modifier={Modifier.foregroundStyle(ShapeStyle.secondary)}>次要文本</Text>

层级样式、颜色和渐变详见 ShapeStyle。

How is this guide?

最后更新于