Skip to content

Tabs: How to combine custom tab with Data Tabs? #1978

Answered by Zaynex
Zaynex asked this question in General
Discussion options

You must be logged in to vote

I find why it won't work.
https://codesandbox.io/s/fervent-pare-mzhq8?file=/src/App.js

<Tabs variant="soft-rounded">
      <TabList>
        <div> //  -> this block the props
          {[1, 2, 3].map((index) => (
            <SustomTab src={"1"}>{index}</SustomTab>
          ))}
        </div>
      </TabList>
      <TabPanels>
        <TabPanel>
          <p>one!</p>
        </TabPanel>
        <TabPanel>
          <p>two!</p>
        </TabPanel>
        <TabPanel>
          <p>three!</p>
        </TabPanel>
      </TabPanels>
    </Tabs>

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Zaynex
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by chasinhues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants