forked from github/plane
3d09a69d58
* fix: eslint fixes --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
27 lines
684 B
TypeScript
27 lines
684 B
TypeScript
// ui
|
|
import { CustomSelect } from "@plane/ui";
|
|
// types
|
|
import { ANALYTICS_Y_AXIS_VALUES } from "constants/analytics";
|
|
import { TYAxisValues } from "@plane/types";
|
|
// 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}
|
|
maxHeight="lg"
|
|
>
|
|
{ANALYTICS_Y_AXIS_VALUES.map((item) => (
|
|
<CustomSelect.Option key={item.value} value={item.value}>
|
|
{item.label}
|
|
</CustomSelect.Option>
|
|
))}
|
|
</CustomSelect>
|
|
);
|