|
|
@@ -8,7 +8,8 @@ type Props = {
|
|
|
label: string;
|
|
|
placeholder?: string;
|
|
|
width?: string;
|
|
|
- data: {value: string, label: string}[]
|
|
|
+ data: {value: string, label: string}[];
|
|
|
+ required?: boolean;
|
|
|
} & UseControllerProps<any, any>;
|
|
|
|
|
|
const ModalSelect: FC<Props> = function({
|
|
|
@@ -17,11 +18,22 @@ const ModalSelect: FC<Props> = function({
|
|
|
label,
|
|
|
placeholder,
|
|
|
data,
|
|
|
+ required,
|
|
|
}) {
|
|
|
return (
|
|
|
<Row className='full-width' gutter={12}>
|
|
|
<Col span={6} offset={2}>
|
|
|
- <label className={css.textRight} htmlFor={`operation_${name}`}>{label}</label>
|
|
|
+ <label
|
|
|
+ className={
|
|
|
+ classNames([
|
|
|
+ css.textRight,
|
|
|
+ {[css.fieldRequired]: required ?? true},
|
|
|
+ ])
|
|
|
+ }
|
|
|
+ htmlFor={`operation_${name}`}
|
|
|
+ >
|
|
|
+ {label}
|
|
|
+ </label>
|
|
|
</Col>
|
|
|
<Col span={12}>
|
|
|
<Controller
|