mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-19 07:56:02 +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}
|
description={props.row.description}
|
||||||
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
|
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
|
||||||
placeholder={props.row.placeholder}
|
placeholder={props.row.placeholder}
|
||||||
|
minLength={props.row.min}
|
||||||
|
maxLength={props.row.max}
|
||||||
disabled={props.row.disabled}
|
disabled={props.row.disabled}
|
||||||
withAsterisk={props.row.required}
|
withAsterisk={props.row.required}
|
||||||
/>
|
/>
|
||||||
@@ -40,6 +42,8 @@ const InputField: React.FC<Props> = (props) => {
|
|||||||
description={props.row.description}
|
description={props.row.description}
|
||||||
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
|
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
|
||||||
placeholder={props.row.placeholder}
|
placeholder={props.row.placeholder}
|
||||||
|
minLength={props.row.min}
|
||||||
|
maxLength={props.row.max}
|
||||||
disabled={props.row.disabled}
|
disabled={props.row.disabled}
|
||||||
withAsterisk={props.row.required}
|
withAsterisk={props.row.required}
|
||||||
visibilityToggleIcon={({ reveal, size }) => (
|
visibilityToggleIcon={({ reveal, size }) => (
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ type BaseField<T, U> = {
|
|||||||
|
|
||||||
export interface IInput extends BaseField<'input', string> {
|
export interface IInput extends BaseField<'input', string> {
|
||||||
password?: boolean;
|
password?: boolean;
|
||||||
|
min?: number;
|
||||||
|
max?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ICheckbox {
|
export interface ICheckbox {
|
||||||
|
|||||||
Reference in New Issue
Block a user