mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
New components, convert hooks to components, bug fixes.
This commit is contained in:
parent
a2db27894f
commit
9d8a2406e1
21 changed files with 330 additions and 181 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import Button from './Button';
|
||||
import { getDateRange } from 'lib/date';
|
||||
import styles from './QuickButtons.module.css';
|
||||
|
||||
|
|
@ -17,13 +18,13 @@ export default function QuickButtons({ value, onChange }) {
|
|||
return (
|
||||
<div className={styles.buttons}>
|
||||
{Object.keys(options).map(key => (
|
||||
<div
|
||||
<Button
|
||||
key={key}
|
||||
className={classNames(styles.button, { [styles.active]: value === key })}
|
||||
className={classNames({ [styles.active]: value === key })}
|
||||
onClick={() => handleClick(key)}
|
||||
>
|
||||
{options[key]}
|
||||
</div>
|
||||
</Button>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue