umami/components/common/FilterButtons.js

12 lines
373 B
JavaScript
Raw Normal View History

2023-02-10 12:26:57 +01:00
import { ButtonGroup, Button, Flexbox } from 'react-basics';
2020-10-13 01:31:51 +02:00
export default function FilterButtons({ items, selectedKey, onSelect }) {
2020-10-13 01:31:51 +02:00
return (
2023-02-10 12:26:57 +01:00
<Flexbox justifyContent="center">
<ButtonGroup items={items} selectedKey={selectedKey} onSelect={onSelect}>
2023-02-10 12:26:57 +01:00
{({ key, label }) => <Button key={key}>{label}</Button>}
</ButtonGroup>
</Flexbox>
2020-10-13 01:31:51 +02:00
);
}