agroptima-design-system 0.16.2-beta.3 → 0.16.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/atoms/Input.tsx +9 -7
package/package.json
CHANGED
package/src/atoms/Input.tsx
CHANGED
|
@@ -36,11 +36,6 @@ export function Input({
|
|
|
36
36
|
}: InputProps): React.JSX.Element {
|
|
37
37
|
const identifier = id || name
|
|
38
38
|
const [showPassword, setShowPassword] = useState(false)
|
|
39
|
-
const cssClasses = classNames('input', className, {
|
|
40
|
-
'with-icon': icon,
|
|
41
|
-
'full-width': fullWidth,
|
|
42
|
-
invalid: errors?.length,
|
|
43
|
-
})
|
|
44
39
|
const helpTexts = buildHelpText(helpText, errors)
|
|
45
40
|
|
|
46
41
|
function handlePasswordIcon() {
|
|
@@ -58,7 +53,11 @@ export function Input({
|
|
|
58
53
|
}
|
|
59
54
|
|
|
60
55
|
return (
|
|
61
|
-
<div
|
|
56
|
+
<div
|
|
57
|
+
className={classNames('input-group', variant, className, {
|
|
58
|
+
'full-width': fullWidth,
|
|
59
|
+
})}
|
|
60
|
+
>
|
|
62
61
|
{!hideLabel && (
|
|
63
62
|
<label className="input-label" htmlFor={identifier}>
|
|
64
63
|
{label}
|
|
@@ -68,7 +67,10 @@ export function Input({
|
|
|
68
67
|
{icon && <Icon className="left-icon" name={icon} />}
|
|
69
68
|
<input
|
|
70
69
|
id={identifier}
|
|
71
|
-
className={
|
|
70
|
+
className={classNames('input', {
|
|
71
|
+
'with-icon': icon,
|
|
72
|
+
invalid: errors?.length,
|
|
73
|
+
})}
|
|
72
74
|
disabled={disabled}
|
|
73
75
|
type={handleInputType()}
|
|
74
76
|
name={name}
|