Estoy usando Ant Design para pestañas en mi proyecto. Pero mientras se usan pestañas horizontales, aparecen pestañas verticales. ¿Al usar la pestaña normal también viene la pestaña vertical? Aquí está la sección de código que contiene pestañas horizontales y verticales. En mi caso, obtengo pestañas verticales en ambos casos.
import { Radio, Tabs } from 'antd'; import { useState } from 'react'; const { TabPane } = Tabs; const App = () => { const [mode, setMode] = useState('top'); const handleModeChange = (e) => { setMode(e.target.value); }; return ( <div> <Radio.Group onChange={handleModeChange} value={mode} style={{ marginBottom: 8, }} > <Radio.Button value="top">Horizontal</Radio.Button> <Radio.Button value="left">Vertical</Radio.Button> </Radio.Group> <Tabs defaultActiveKey="1" tabPosition={mode} style={{ height: 220, }} > {[ ...Array.from( { length: 30, }, (_, i) => i, ), ].map((i) => ( <TabPane tab={`Tab-${i}`} key={i} disabled={i === 28}> Content of tab {i} </TabPane> ))} </Tabs> </div> ); }; export default App;