aboutsummaryrefslogtreecommitdiff
path: root/src/components/input/ActionSelect.tsx
blob: 616ee34717e16742d7c8866c6a421b854bb1be37 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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>
  );
}