mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 15:36:02 +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 { Control, useController } from 'react-hook-form';
|
||||||
import { FormValues } from '../../InputDialog';
|
import { FormValues } from '../../InputDialog';
|
||||||
import { ColorInput } from '@mantine/core';
|
import { ColorInput } from '@mantine/core';
|
||||||
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
row: IColorInput;
|
row: IColorInput;
|
||||||
@@ -31,6 +32,7 @@ const ColorField: React.FC<Props> = (props) => {
|
|||||||
defaultValue={props.row.default}
|
defaultValue={props.row.default}
|
||||||
format={props.row.format}
|
format={props.row.format}
|
||||||
withAsterisk={props.row.required}
|
withAsterisk={props.row.required}
|
||||||
|
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ export interface IColorInput {
|
|||||||
description?: string;
|
description?: string;
|
||||||
format?: 'hex' | 'hexa' | 'rgb' | 'rgba' | 'hsl' | 'hsla';
|
format?: 'hex' | 'hexa' | 'rgb' | 'rgba' | 'hsl' | 'hsla';
|
||||||
required?: boolean;
|
required?: boolean;
|
||||||
|
icon?: IconProp;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IDateInput {
|
export interface IDateInput {
|
||||||
|
|||||||
Reference in New Issue
Block a user