@foris/avocado-suite 0.20.0 → 0.22.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.
@@ -1,17 +1,20 @@
1
1
  import React, { FC } from 'react';
2
2
  import { IconTypes } from '../../../../avocado-icons';
3
3
  export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
4
+ export type ButtonSize = 'sm' | 'md';
4
5
  export interface ButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
5
6
  /** Render content button */
6
7
  children: React.ReactNode | string;
7
8
  /** Overwrite className */
8
9
  className?: string;
9
- /** Loading state */
10
- loading?: boolean;
11
10
  /** Show icon on the left */
12
11
  leftIcon?: IconTypes;
12
+ /** Loading state */
13
+ loading?: boolean;
13
14
  /** Show icon on the right */
14
15
  rightIcon?: IconTypes;
16
+ /** Size type */
17
+ size?: ButtonSize;
15
18
  /** Use the variant prop to change the visual style of the Button */
16
19
  variant?: ButtonVariant;
17
20
  }
@@ -1,17 +1,19 @@
1
1
  import { FC } from 'react';
2
- import { ButtonVariant } from '../button/Button';
2
+ import { ButtonVariant, ButtonSize } from '../button/Button';
3
3
  import { IconTypes } from '../../../../avocado-icons';
4
4
  interface RoundButtonProps extends Partial<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>> {
5
- /** Icon name */
6
- icon: IconTypes;
7
- /** Variant of the button */
8
- variant?: ButtonVariant;
9
5
  /** Overwrite className */
10
6
  className?: string;
11
- /** Loading state */
12
- loading?: boolean;
13
7
  /** Disabled state */
14
8
  disabled?: boolean;
9
+ /** Icon name */
10
+ icon: IconTypes;
11
+ /** Loading state */
12
+ loading?: boolean;
13
+ /** Size type */
14
+ size?: ButtonSize;
15
+ /** Variant of the button */
16
+ variant?: ButtonVariant;
15
17
  }
16
18
  declare const RoundButton: FC<RoundButtonProps>;
17
19
  export default RoundButton;
@@ -1,9 +1,12 @@
1
1
  import { DetailedHTMLProps, InputHTMLAttributes, FC } from 'react';
2
+ import type { IconTypes } from '../../../../avocado-icons';
2
3
  export interface TextFieldProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
3
- /** Overwrite className */
4
- className?: string;
5
4
  /** If allow to remove input content with clear icon */
6
5
  allowClear?: boolean;
6
+ /** Overwrite className */
7
+ className?: string;
8
+ /** Set the icon */
9
+ icon?: IconTypes;
7
10
  /** Set top label */
8
11
  label?: string;
9
12
  /** Set validation status */