feat(web/input): select row icon

This commit is contained in:
Luke
2023-01-09 14:39:49 +01:00
parent 8936191f2e
commit d337bc096d
2 changed files with 3 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ import { Select } from '@mantine/core';
import { ISelect } from '../../../../interfaces/dialog';
import { Control, FieldValues, useController, UseFormRegisterReturn, UseFormSetValue } from 'react-hook-form';
import { FormValues } from '../../InputDialog';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
interface Props {
row: ISelect;
@@ -30,6 +31,7 @@ const SelectField: React.FC<Props> = (props) => {
description={props.row.description}
withAsterisk={props.row.required}
clearable={props.row.clearable}
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
/>
);
};

View File

@@ -31,6 +31,7 @@ export interface ISelect {
description?: string;
required?: boolean;
clearable?: boolean;
icon?: IconProp;
}
export interface INumber {