2022-03-21 11:09:01 -07:00
|
|
|
import * as React from 'react';
|
|
|
|
|
2022-06-08 09:06:05 -07:00
|
|
|
interface ISelect extends React.SelectHTMLAttributes<HTMLSelectElement> {
|
|
|
|
children: Iterable<React.ReactNode>,
|
|
|
|
}
|
|
|
|
|
2022-04-30 21:39:58 -07:00
|
|
|
/** Multiple-select dropdown. */
|
2022-06-08 09:06:05 -07:00
|
|
|
const Select = React.forwardRef<HTMLSelectElement, ISelect>((props, ref) => {
|
2022-03-21 11:09:01 -07:00
|
|
|
const { children, ...filteredProps } = props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<select
|
|
|
|
ref={ref}
|
2022-06-08 09:06:05 -07:00
|
|
|
className='w-full pl-3 pr-10 py-2 text-base border-gray-300 dark:border-slate-700 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 dark:bg-slate-800 dark:text-white sm:text-sm rounded-md disabled:opacity-50'
|
2022-03-21 11:09:01 -07:00
|
|
|
{...filteredProps}
|
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</select>
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
export default Select;
|