@moda/om 21.10.0 → 21.11.0

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.
@@ -3,7 +3,9 @@ import { TextInputProps } from '../TextInput';
3
3
  import './Field.scss';
4
4
  export type FieldProps = TextInputProps & {
5
5
  children?: JSX.Element;
6
+ showErrorIcon?: boolean;
6
7
  };
7
8
  export declare const Field: React.ForwardRefExoticComponent<import("..").InputProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> & {
8
9
  children?: JSX.Element;
10
+ showErrorIcon?: boolean;
9
11
  } & React.RefAttributes<HTMLInputElement>>;
@@ -4,4 +4,5 @@ import './PasswordInput.scss';
4
4
  export type PasswordInputProps = FieldProps;
5
5
  export declare const PasswordInput: React.ForwardRefExoticComponent<import("..").InputProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> & {
6
6
  children?: React.JSX.Element;
7
+ showErrorIcon?: boolean;
7
8
  } & React.RefAttributes<HTMLInputElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moda/om",
3
- "version": "21.10.0",
3
+ "version": "21.11.0",
4
4
  "description": "Moda Operandi design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -9,11 +9,12 @@ import './Field.scss';
9
9
 
10
10
  export type FieldProps = TextInputProps & {
11
11
  children?: JSX.Element;
12
+ showErrorIcon?: boolean;
12
13
  };
13
14
 
14
15
  export const Field = React.forwardRef(
15
16
  (
16
- { className, children, error, label, placeholder, ...rest }: FieldProps,
17
+ { className, children, error, label, placeholder, showErrorIcon = true, ...rest }: FieldProps,
17
18
  ref: React.Ref<HTMLInputElement>
18
19
  ) => {
19
20
  const id = useId();
@@ -44,7 +45,7 @@ export const Field = React.forwardRef(
44
45
  ...children.props
45
46
  })}
46
47
 
47
- {error && (
48
+ {error && showErrorIcon && (
48
49
  <span className='Field__icon'>
49
50
  <WarningIcon />
50
51
  </span>