mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 15:06:02 +01:00
feat(web/dialog): precision prop for number input (#372)
* feat(web/input): added precision prop for number input * fix(web/input): added missing disabled prop to checkbox * fix(web/input): correct icon for debug data * fix(web/input): remove step prop from typings * fix(web/debug): remove step prop
This commit is contained in:
@@ -40,6 +40,14 @@ export const debugInput = () => {
|
||||
max: 10,
|
||||
icon: 'receipt',
|
||||
},
|
||||
{
|
||||
type: 'number',
|
||||
label: 'Price',
|
||||
default: 6.5,
|
||||
min: 0,
|
||||
max: 10,
|
||||
icon: 'receipt',
|
||||
},
|
||||
{
|
||||
type: 'slider',
|
||||
label: 'Slide bar',
|
||||
|
||||
@@ -16,6 +16,7 @@ const CheckboxField: React.FC<Props> = (props) => {
|
||||
required={props.row.required}
|
||||
label={props.row.label}
|
||||
defaultChecked={props.row.checked}
|
||||
disabled={props.row.disabled}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -30,6 +30,7 @@ const NumberField: React.FC<Props> = (props) => {
|
||||
defaultValue={props.row.default}
|
||||
min={props.row.min}
|
||||
max={props.row.max}
|
||||
precision={props.row.precision}
|
||||
disabled={props.row.disabled}
|
||||
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
|
||||
withAsterisk={props.row.required}
|
||||
|
||||
Reference in New Issue
Block a user