How to change layout of Office's Fabric elements?

江枫思渺然 提交于 2019-12-11 20:01:25

问题


I'm fairly new to React and Microsoft's Fabric. I've been trying to figure out if I can change the layout of elements inside a <GroupHeader> Looking at the source it's not totally clear to me if the elements follow some sort of layout style, or if they just appear in the order of declaration inside the render function. I was hoping to rearrange some elements rather than create a completely custom <GroupHeader>. I've tried adjusting some CSS properties and passing those in as a className, but it hasn't worked.

Is there a way to do that? Or what would be the best approach to this task?


回答1:


I've put this codepen real quick to show how a GroupHeader can be styled by changing the order of the collapse button. There are probably a few other methods including a regular css style or even a custom onRenderHeader but it looks like you don't wanna create a custom renderer. Let me know if that helps!



来源:https://stackoverflow.com/questions/56084592/how-to-change-layout-of-offices-fabric-elements

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!