@foris/avocado-suite 0.20.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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;