我正在使用fluentui/areact northstar
,因为在文档中,样式具有低于定义的
Name Default Type Description
styles ComponentSlotStyle Additional CSS styles to apply to the component instance.
但是样式和风格在组件上有什么不同。
<Flex styles={{ marginTop: 15 }}> </Flex>
<Flex style={{ marginTop: 15 }}> </Flex>
style
是react
为所有HTML元素提供的道具(与HTML中的样式属性相同(
styles
是为接受IStyleableComponentProps
的组件提供的道具,它在样式属性上提供了额外的功能,如主题化。