2023-05-16 05:11:37 +00:00
|
|
|
// ui
|
2024-03-19 14:38:35 +00:00
|
|
|
import { TYAxisValues } from "@plane/types";
|
2023-10-19 09:54:51 +00:00
|
|
|
import { CustomSelect } from "@plane/ui";
|
2023-05-16 05:11:37 +00:00
|
|
|
// types
|
2024-03-19 14:38:35 +00:00
|
|
|
import { ANALYTICS_Y_AXIS_VALUES } from "@/constants/analytics";
|
2023-05-16 05:11:37 +00:00
|
|
|
// constants
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
value: TYAxisValues;
|
|
|
|
onChange: () => void;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const SelectYAxis: React.FC<Props> = ({ value, onChange }) => (
|
|
|
|
<CustomSelect
|
|
|
|
value={value}
|
|
|
|
label={<span>{ANALYTICS_Y_AXIS_VALUES.find((v) => v.value === value)?.label ?? "None"}</span>}
|
|
|
|
onChange={onChange}
|
2024-01-23 08:55:09 +00:00
|
|
|
maxHeight="lg"
|
2023-05-16 05:11:37 +00:00
|
|
|
>
|
|
|
|
{ANALYTICS_Y_AXIS_VALUES.map((item) => (
|
|
|
|
<CustomSelect.Option key={item.value} value={item.value}>
|
|
|
|
{item.label}
|
|
|
|
</CustomSelect.Option>
|
|
|
|
))}
|
|
|
|
</CustomSelect>
|
|
|
|
);
|