mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
feat(interface/input): minLength & maxLength option (#286)
This commit is contained in:
@@ -29,6 +29,8 @@ const InputField: React.FC<Props> = (props) => {
|
||||
description={props.row.description}
|
||||
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
|
||||
placeholder={props.row.placeholder}
|
||||
minLength={props.row.min}
|
||||
maxLength={props.row.max}
|
||||
disabled={props.row.disabled}
|
||||
withAsterisk={props.row.required}
|
||||
/>
|
||||
@@ -40,6 +42,8 @@ const InputField: React.FC<Props> = (props) => {
|
||||
description={props.row.description}
|
||||
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
|
||||
placeholder={props.row.placeholder}
|
||||
minLength={props.row.min}
|
||||
maxLength={props.row.max}
|
||||
disabled={props.row.disabled}
|
||||
withAsterisk={props.row.required}
|
||||
visibilityToggleIcon={({ reveal, size }) => (
|
||||
|
||||
@@ -21,6 +21,8 @@ type BaseField<T, U> = {
|
||||
|
||||
export interface IInput extends BaseField<'input', string> {
|
||||
password?: boolean;
|
||||
min?: number;
|
||||
max?: number;
|
||||
}
|
||||
|
||||
export interface ICheckbox {
|
||||
|
||||
Reference in New Issue
Block a user