mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Added icon to teams button.
This commit is contained in:
parent
44393472cf
commit
b7083421e5
@ -7,9 +7,11 @@ import styles from './TeamsButton.module.css';
|
|||||||
|
|
||||||
export function TeamsButton({
|
export function TeamsButton({
|
||||||
teamId,
|
teamId,
|
||||||
|
className,
|
||||||
onChange,
|
onChange,
|
||||||
}: {
|
}: {
|
||||||
teamId: string;
|
teamId: string;
|
||||||
|
className?: string;
|
||||||
onChange?: (value: string) => void;
|
onChange?: (value: string) => void;
|
||||||
}) {
|
}) {
|
||||||
const { user } = useLogin();
|
const { user } = useLogin();
|
||||||
@ -28,9 +30,12 @@ export function TeamsButton({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<PopupTrigger>
|
<PopupTrigger>
|
||||||
<Button className={styles.button} variant="quiet">
|
<Button className={classNames(styles.button, className)} variant="quiet">
|
||||||
<Icon>{teamId ? <Icons.Users /> : <Icons.User />}</Icon>
|
<Icon>{teamId ? <Icons.Users /> : <Icons.User />}</Icon>
|
||||||
<Text>{teamId ? team?.name : user.username}</Text>
|
<Text>{teamId ? team?.name : user.username}</Text>
|
||||||
|
<Icon>
|
||||||
|
<Icons.ChevronDown />
|
||||||
|
</Icon>
|
||||||
</Button>
|
</Button>
|
||||||
<Popup alignment="end">
|
<Popup alignment="end">
|
||||||
{(close: () => void) => (
|
{(close: () => void) => (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user