在组件fluentui/areact northstar中,样式与样式之间有什么不同



我正在使用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>

stylereact为所有HTML元素提供的道具(与HTML中的样式属性相同(

styles是为接受IStyleableComponentProps的组件提供的道具,它在样式属性上提供了额外的功能,如主题化。

最新更新