diff --git a/web/src/features/dev/debug/input.ts b/web/src/features/dev/debug/input.ts index 63896e4..689f2c5 100644 --- a/web/src/features/dev/debug/input.ts +++ b/web/src/features/dev/debug/input.ts @@ -27,6 +27,7 @@ export const debugInput = () => { default: 12, min: 3, max: 10, + icon: 'receipt', }, { type: 'slider', label: 'Slide bar', min: 10, max: 50, step: 2 }, ], diff --git a/web/src/features/dialog/components/input.tsx b/web/src/features/dialog/components/input.tsx index 1601e1a..2ecfc4e 100644 --- a/web/src/features/dialog/components/input.tsx +++ b/web/src/features/dialog/components/input.tsx @@ -22,7 +22,7 @@ const InputField: React.FC = (props) => { {props.row.label} {props.row.icon && ( - } /> + } /> )} ) => props.handleChange(e.target.value, props.index)} diff --git a/web/src/features/dialog/components/number.tsx b/web/src/features/dialog/components/number.tsx index dca8c3f..a8c758c 100644 --- a/web/src/features/dialog/components/number.tsx +++ b/web/src/features/dialog/components/number.tsx @@ -6,9 +6,11 @@ import { NumberInputStepper, NumberIncrementStepper, NumberDecrementStepper, + InputLeftElement, } from '@chakra-ui/react'; import { useEffect } from 'react'; import { INumber } from '../../../interfaces/dialog'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; interface Props { row: INumber; @@ -30,7 +32,10 @@ const NumberField: React.FC = (props) => { min={props.row.min} max={props.row.max} > - + {props.row.icon && ( + } /> + )} + diff --git a/web/src/interfaces/dialog.ts b/web/src/interfaces/dialog.ts index ebaf191..90d5666 100644 --- a/web/src/interfaces/dialog.ts +++ b/web/src/interfaces/dialog.ts @@ -27,6 +27,7 @@ export interface INumber { label: string; placeholder?: string; default?: number; + icon?: IconProp; min?: number; max?: number; }