开发者

Mui - remove props from being passed from parent <Tabs to child <ToggleButton

Mui - How do you NOT 开发者_JAVA百科PASS specific props from being passed down from the parent ( <Tabs ) to child ( <ToggleButton )?

i needed the <Tabs functions, with toggle buttons - so I combined them

note: i use the <popper mui function on the <ToggleButton ( <Tab will not work, need to use <Tabs + <ToggleButton )

<Tabs
// stop specific props from being
// passed to the child button
// sx={ don’t pass the these ( error 1, error 2, error 3 - see below errors ) props to child <ToggleButton }
>

<ToggleButton>

<icon/>

</ToggleButton>

</Tabs>

ref

https://mui.com/material-ui/react-tabs/#main-content

https://mui.com/system/getting-started/the-sx-prop/

Was unable to figure out a solution to NOT PASS the props - errors resulting from the default passing of the props from parent <Tabs to child <ToggleButton

I’m thinking we can control that at the parent <Tabs level possibly using the sx={} prop

NOTE: there are 45 <ToggleButtons - NOT PASSING these prop values AT the <Tabs level would be cool and more efficient

error 1

next-dev.js?3515:20 Warning: Received false for a non-boolean attribute indicator.

error 2

Warning: React does not recognize the selectionFollowsFocus prop on a DOM element.

error 3

Warning: React does not recognize the textColor prop on a DOM element.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜