Closed ghost closed 2 years ago
Here's a workaround where I am using the ButtonGroup like tabs:
const [activeTab, setActiveTab] = useState('a');
...
<Button.Group size="xl">
<Button
onClick={() => setActiveTab('a')}
light={activeTab !== 'a'}
bordered={activeTab === 'a'}>a</Button>
<Button
onClick={() => setActiveTab('b')}
light={activeTab !== 'b'}
bordered={activeTab === 'b'}>b</Button>
<Button
onClick={() => setActiveTab('c')}
light={activeTab !== 'c'}
bordered={activeTab === 'c'}>c</Button>
</Button.Group>
Would be good to have this in the documentation.
Is your feature request related to a problem? Please describe.
I got a requirement that displays selected button in button group. (Like radio button!) But there is no selected prop or selection mode in Button Group.
Describe the solution you'd like
So I overwrite selected button's css like this:
Describe alternatives you've considered
Do you have a roadmap about this already? I would be very happy if this feature is built in :)
Screenshots or Videos
No response