1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-11 00:52:29 +01:00

21 lines
680 B
TypeScript
Raw Normal View History

2022-04-04 18:19:59 +02:00
import React, { SelectHTMLAttributes } from 'react';
import Select from 'react-select';
import { Controller } from 'react-hook-form';
interface FabSelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
className?: string
}
export const FabSelect: React.FC<FabSelectProps> = ({ className }) => {
return (
<div className={`fab-select ${className || ''}`}>
<Controller name="description" control={control} render={({ field: { onChange, value } }) =>
<Select defaultValue={defaultValues()}
placeholder={t('app.shared.event.select_theme')}
options={buildOptions()}
isMulti />
} />
</div>
);
};