mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 07:07:17 +01:00
18 lines
560 B
TypeScript
18 lines
560 B
TypeScript
import { ListItem, Select } from '@umami/react-zen';
|
|
import { useMessages } from '@/components/hooks';
|
|
|
|
export interface ActionSelectProps {
|
|
value?: string;
|
|
onChange?: (value: string) => void;
|
|
}
|
|
|
|
export function ActionSelect({ value = 'path', onChange }: ActionSelectProps) {
|
|
const { formatMessage, labels } = useMessages();
|
|
|
|
return (
|
|
<Select value={value} onChange={onChange}>
|
|
<ListItem id="path">{formatMessage(labels.viewedPage)}</ListItem>
|
|
<ListItem id="event">{formatMessage(labels.triggeredEvent)}</ListItem>
|
|
</Select>
|
|
);
|
|
}
|