fleet/frontend/components/TableContainer/DataTable/DropdownCell/DropdownCell.tsx
2022-03-10 10:10:44 -05:00

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;