mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 15:36:02 +01:00
feat(web/input): select row icon
This commit is contained in:
@@ -2,6 +2,7 @@ import { Select } from '@mantine/core';
|
|||||||
import { ISelect } from '../../../../interfaces/dialog';
|
import { ISelect } from '../../../../interfaces/dialog';
|
||||||
import { Control, FieldValues, useController, UseFormRegisterReturn, UseFormSetValue } from 'react-hook-form';
|
import { Control, FieldValues, useController, UseFormRegisterReturn, UseFormSetValue } from 'react-hook-form';
|
||||||
import { FormValues } from '../../InputDialog';
|
import { FormValues } from '../../InputDialog';
|
||||||
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
row: ISelect;
|
row: ISelect;
|
||||||
@@ -30,6 +31,7 @@ const SelectField: React.FC<Props> = (props) => {
|
|||||||
description={props.row.description}
|
description={props.row.description}
|
||||||
withAsterisk={props.row.required}
|
withAsterisk={props.row.required}
|
||||||
clearable={props.row.clearable}
|
clearable={props.row.clearable}
|
||||||
|
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ export interface ISelect {
|
|||||||
description?: string;
|
description?: string;
|
||||||
required?: boolean;
|
required?: boolean;
|
||||||
clearable?: boolean;
|
clearable?: boolean;
|
||||||
|
icon?: IconProp;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface INumber {
|
export interface INumber {
|
||||||
|
|||||||
Reference in New Issue
Block a user