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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agroptima-design-system",
3
- "version": "0.16.2-beta.3",
3
+ "version": "0.16.2-beta.4",
4
4
  "scripts": {
5
5
  "dev": "npm run storybook",
6
6
  "storybook": "storybook dev -p 6006 --ci",
@@ -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 className={`input-group ${variant}`}>
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={cssClasses}
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}