为平台提供的新式主题设置提供 API
适用于
模型驱动和画布应用
Syntax
context.fluentDesignLanguage
属性
tokenTheme
平台提供的 Fluent v9 主题令牌。
类型: 主题
typographyTokens
平台提供的 Fluent v9 版式令牌。
类型: 版式
品牌
基于生成 Fluent v9 主题的 Fluent v9 BrandVariants。
类型: BrandVariants
isDarkTheme
指示当前主题是否为深色。
类型:boolean
Example
const fluentDesignLanguage = props.context.fluentDesignLanguage;
return (
<FluentProvider theme={props.theme}>
<Label weight="semibold">{"Theming provided by the control."}</Label>
</FluentProvider>
);