mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Updated layout. Fixed properties rendering.
This commit is contained in:
parent
01bfd7f52e
commit
876f4c883e
18 changed files with 214 additions and 176 deletions
|
|
@ -1,16 +1,17 @@
|
|||
import { useState } from 'react';
|
||||
import { Select, SelectProps, ListItem } from '@umami/react-zen';
|
||||
import { useUserWebsitesQuery, useWebsiteQuery, useNavigation } from '@/components/hooks';
|
||||
import { ButtonProps } from 'react-basics';
|
||||
|
||||
export function WebsiteSelect({
|
||||
websiteId,
|
||||
teamId,
|
||||
variant,
|
||||
buttonProps,
|
||||
...props
|
||||
}: {
|
||||
websiteId?: string;
|
||||
teamId?: string;
|
||||
variant?: 'primary' | 'outline' | 'quiet' | 'danger' | 'zero';
|
||||
buttonProps?: ButtonProps;
|
||||
} & SelectProps) {
|
||||
const { router, renderUrl } = useNavigation();
|
||||
const [search, setSearch] = useState('');
|
||||
|
|
@ -32,7 +33,7 @@ export function WebsiteSelect({
|
|||
items={data?.['data'] || []}
|
||||
value={websiteId}
|
||||
isLoading={isLoading}
|
||||
buttonProps={{ variant }}
|
||||
buttonProps={buttonProps}
|
||||
allowSearch={true}
|
||||
searchValue={search}
|
||||
onSearch={handleSearch}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue