mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
a49f00bd39
* chore: update all issue property components * style: issue properties
29 lines
718 B
TypeScript
29 lines
718 B
TypeScript
import { observer } from "mobx-react-lite";
|
|
// components
|
|
import { StateSelect } from "components/states";
|
|
// types
|
|
import { IState } from "types";
|
|
|
|
export interface IIssuePropertyState {
|
|
value: IState;
|
|
onChange: (state: IState) => void;
|
|
states: IState[] | null;
|
|
disabled?: boolean;
|
|
hideDropdownArrow?: boolean;
|
|
}
|
|
|
|
export const IssuePropertyState: React.FC<IIssuePropertyState> = observer((props) => {
|
|
const { value, onChange, states, disabled, hideDropdownArrow = false } = props;
|
|
|
|
return (
|
|
<StateSelect
|
|
value={value}
|
|
onChange={onChange}
|
|
states={states ?? undefined}
|
|
buttonClassName="h-5"
|
|
disabled={disabled}
|
|
hideDropdownArrow={hideDropdownArrow}
|
|
/>
|
|
);
|
|
});
|