开发者

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

开发者 https://www.devze.com 2022-12-07 20:47 出处:网络
Mui - How do you NOT 开发者_JAVA百科PASS specific props from being passed down from the 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

精彩评论

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