mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
refactor(web/input): add missing icon prop to color type
This commit is contained in:
@@ -2,6 +2,7 @@ import { IColorInput } from '../../../../interfaces/dialog';
|
||||
import { Control, useController } from 'react-hook-form';
|
||||
import { FormValues } from '../../InputDialog';
|
||||
import { ColorInput } from '@mantine/core';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
|
||||
interface Props {
|
||||
row: IColorInput;
|
||||
@@ -31,6 +32,7 @@ const ColorField: React.FC<Props> = (props) => {
|
||||
defaultValue={props.row.default}
|
||||
format={props.row.format}
|
||||
withAsterisk={props.row.required}
|
||||
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -66,6 +66,7 @@ export interface IColorInput {
|
||||
description?: string;
|
||||
format?: 'hex' | 'hexa' | 'rgb' | 'rgba' | 'hsl' | 'hsla';
|
||||
required?: boolean;
|
||||
icon?: IconProp;
|
||||
}
|
||||
|
||||
export interface IDateInput {
|
||||
|
||||
Reference in New Issue
Block a user