mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
801f75f406
* chore: dropdowns should close on selecting an option * style: @plane/ui dropdown styling * refactor: @plane/ui dropdowns * fix: build errors * fix: list layout dropdowns positioning * fix: priority dropdown text in dark mode
27 lines
684 B
TypeScript
27 lines
684 B
TypeScript
// ui
|
|
import { CustomSelect } from "@plane/ui";
|
|
// types
|
|
import { TYAxisValues } from "@plane/types";
|
|
// constants
|
|
import { ANALYTICS_Y_AXIS_VALUES } from "constants/analytics";
|
|
|
|
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>
|
|
);
|