mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 07:07:17 +01:00
Sticky metrics header. CSS updates.
This commit is contained in:
parent
a65f637df2
commit
9c5762b8a2
16 changed files with 193 additions and 104 deletions
|
|
@ -1,7 +1,8 @@
|
|||
import React, { useState, useEffect, useRef } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import styles from './Dropdown.module.css';
|
||||
|
||||
export default function DropDown({ value, options = [], onChange }) {
|
||||
export default function DropDown({ value, options = [], onChange, className }) {
|
||||
const [showMenu, setShowMenu] = useState(false);
|
||||
const ref = useRef();
|
||||
|
||||
|
|
@ -30,7 +31,7 @@ export default function DropDown({ value, options = [], onChange }) {
|
|||
}, [ref]);
|
||||
|
||||
return (
|
||||
<div ref={ref} className={styles.dropdown} onClick={handleShowMenu}>
|
||||
<div ref={ref} className={classNames(styles.dropdown, className)} onClick={handleShowMenu}>
|
||||
<div className={styles.value}>
|
||||
{options.find(e => e.value === value).label}
|
||||
<div className={styles.caret} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue