// ui import { CustomSelect } from "components/ui"; // helpers import { addSpaceIfCamelCase } from "helpers/string.helper"; // types import { IIssue, IState } from "types"; type Props = { issue: IIssue; states: IState[] | undefined; partialUpdateIssue: (formData: Partial) => void; isNotAllowed: boolean; }; export const StateSelect: React.FC = ({ issue, states, partialUpdateIssue, isNotAllowed, }) => ( s.id === issue.state)?.color, }} /> {addSpaceIfCamelCase(states?.find((s) => s.id === issue.state)?.name ?? "")} } value={issue.state} onChange={(data: string) => { partialUpdateIssue({ state: data }); }} maxHeight="md" noChevron disabled={isNotAllowed} > {states?.map((state) => ( <> {addSpaceIfCamelCase(state.name)} ))} );