umami/components/common/FilterButtons.js
2023-02-10 03:26:57 -08:00

12 lines
367 B
JavaScript

import { ButtonGroup, Button, Flexbox } from 'react-basics';
export default function FilterButtons({ items, selected, onSelect }) {
return (
<Flexbox justifyContent="center">
<ButtonGroup items={items} selectedKey={selected} onSelect={onSelect}>
{({ key, label }) => <Button key={key}>{label}</Button>}
</ButtonGroup>
</Flexbox>
);
}