The <ButtonGroup />
allows you to combine a stack of buttons into a single unit.
import { ButtonGroup } from '@marvelapp/ui';
The <ButtonGroup />
component accepts a single buttons
array, which should
contain objects with button properties. THe styling is done internally, so you
won’t have to control it.
<ButtonGroup
buttons={[
{
id: 0,
onClick: () => null,
title: 'Monthly',
isActive: true,
testId: 'monthly',
},
{
id: 1,
onClick: () => null,
title: 'Yearly',
testId: 'yearly',
},
{
id: 2,
onClick: () => null,
title: 'Once',
testId: 'once',
},
{
id: 3,
onClick: () => null,
title: 'Never',
testId: 'never',
},
]}
/>