I am currently working on creating Tabs using react-tabs. The tab contents are being displayed one after another (on different tabs) as shown below
Here is the code snippet:
<Tabs className="tabs">
<TabList className="tab-header-list">
<Tab selectedClassName="tab-header-list-items"><b>A</b></Tab>
<Tab selectedClassName="tab-header-list-items"><b>B</b></Tab>
<Tab selectedClassName="tab-header-list-items"><b>C</b></Tab>
<Tab selectedClassName="tab-header-list-items"><b>D</b></Tab>
</TabList>
<TabPanel key="1" className="tab-panel">
<BarChart chartData={userData} />
</TabPanel>
<TabPanel key="3" className="tab-panel">
<BarChart chartData={userData} />
</TabPanel>
<TabPanel key="2" className="tab-panel">
<BarChart chartData={userData} />
</TabPanel>
</Tabs>
CSS styles applied:
.tabs {
}
.tab-header-list{
color: grey;
}
.tab-header-list-items {
display: inline-block;
background-color: black;
width: 25%;
color: black;
}
.tab-panel {
width: 900px;
height: 300px;
}
I have tried adjusting flex and display properties, but so far nothing has resolved the issue. Any suggestions would be appreciated.