mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 23:46:03 +01:00
feat(web): font awesome icon animations
This commit is contained in:
@@ -3,6 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import React from 'react';
|
||||
import { IInput } from '../../../../typings/dialog';
|
||||
import { UseFormRegisterReturn } from 'react-hook-form';
|
||||
import LibIcon from '../../../../components/LibIcon';
|
||||
|
||||
interface Props {
|
||||
register: UseFormRegisterReturn;
|
||||
@@ -27,7 +28,7 @@ const InputField: React.FC<Props> = (props) => {
|
||||
defaultValue={props.row.default}
|
||||
label={props.row.label}
|
||||
description={props.row.description}
|
||||
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
|
||||
icon={props.row.icon && <LibIcon icon={props.row.icon} fixedWidth />}
|
||||
placeholder={props.row.placeholder}
|
||||
minLength={props.row.min}
|
||||
maxLength={props.row.max}
|
||||
@@ -40,14 +41,14 @@ const InputField: React.FC<Props> = (props) => {
|
||||
defaultValue={props.row.default}
|
||||
label={props.row.label}
|
||||
description={props.row.description}
|
||||
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
|
||||
icon={props.row.icon && <LibIcon 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 }) => (
|
||||
<FontAwesomeIcon
|
||||
<LibIcon
|
||||
icon={reveal ? 'eye-slash' : 'eye'}
|
||||
fontSize={size}
|
||||
cursor="pointer"
|
||||
|
||||
Reference in New Issue
Block a user