fix: reccuring input width (#8227)

Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
JoeandPeer Richelsen authored and GitHub committed 2023-04-13 18:26:13 +00:00
1 parent 2f33b57eb7
commit 17f48614ff
4 files changed
+23 -5

No files matched your search

+1
View File
@@ -15,6 +15,7 @@ export {
TextAreaField,
TextField,
InputFieldWithSelect,
NumberInput,
} from "./inputs/Input";
export { Label } from "./inputs/Label";
export { Select, SelectField, SelectWithValidation, getReactSelectProps } from "./select";
@@ -406,3 +406,17 @@ export const InputFieldWithSelect = forwardRef<
/>
);
});
export const NumberInput = forwardRef<HTMLInputElement, InputFieldProps>(function NumberInput(props, ref) {
return (
<Input
ref={ref}
type="number"
autoCapitalize="none"
autoComplete="numeric"
autoCorrect="off"
inputMode="numeric"
{...props}
/>
);
});