mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 09:18:59 +00:00
35 lines
717 B
TypeScript
35 lines
717 B
TypeScript
import React from "react";
|
|
|
|
// ignore TS error for now until these are rewritten in ts.
|
|
// @ts-ignore
|
|
import Dropdown from "components/forms/fields/Dropdown";
|
|
|
|
import { IDropdownOption } from "interfaces/dropdownOption";
|
|
|
|
const baseClass = "dropdown-cell";
|
|
|
|
interface IDropdownCellProps {
|
|
options: IDropdownOption[];
|
|
placeholder: string;
|
|
onChange: (value: string) => void;
|
|
}
|
|
|
|
const DropdownCell = ({
|
|
options,
|
|
onChange,
|
|
placeholder,
|
|
}: IDropdownCellProps): JSX.Element => {
|
|
return (
|
|
<div className={baseClass}>
|
|
<Dropdown
|
|
onChange={onChange}
|
|
placeholder={placeholder}
|
|
searchable={false}
|
|
options={options}
|
|
/>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default DropdownCell;
|