import React, { FC } from 'react'; import classNames from 'classnames'; import css from './index.module.css'; import { getModifier } from '../../helpers/getModifier'; export interface DropdownOption { value: string; name: string; } export interface DropdownProps { options: DropdownOption[]; onChange?: (e) => void; disabled?: boolean; value?: string; label: string; hideLabel?: boolean; name: string; type?: 'normal' | 'filled'; } const Dropdown: FC = ({ options, onChange, value, disabled, label, name, type = 'normal', hideLabel, }) => { const dropdownClassNames = classNames(css.dropdown, { [`${css[`dropdown${getModifier(type)}`]}`]: type, }); return (
{!hideLabel && {label}}
); }; export default Dropdown;