@foris/avocado-suite 0.17.0 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
  export interface BoxProps {
3
- /** content card */
3
+ /** Content card */
4
4
  children: ReactNode | string;
5
5
  /** Overwrite className */
6
6
  className?: string;
@@ -1,5 +1,5 @@
1
- import { FC, ReactNode } from 'react';
2
- interface CardProps {
1
+ import React, { FC, ReactNode } from 'react';
2
+ interface CardProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
3
3
  /** Content card */
4
4
  children: ReactNode;
5
5
  /** Overwrite className */
@@ -1,5 +1,5 @@
1
- import { FC } from 'react';
2
1
  import { ReactElement } from 'react';
2
+ import { FC } from 'react';
3
3
  declare enum NotificationState {
4
4
  Warning = "warning",
5
5
  Error = "error",
@@ -0,0 +1,20 @@
1
+ import type { FC, ReactNode } from 'react';
2
+ import { type ButtonVariant } from '../button/Button';
3
+ export interface DropdownButtonItemProps {
4
+ label: ReactNode | string;
5
+ onClick: () => void;
6
+ }
7
+ export interface DropdownButtonProps {
8
+ /** Render content button */
9
+ children: ReactNode | string;
10
+ /** Overwrite className */
11
+ className?: string;
12
+ /** Is the dropdown disabled */
13
+ disabled?: boolean;
14
+ /** List of items to show in menu */
15
+ items: DropdownButtonItemProps[];
16
+ /** Use the variant prop to change the visual style of the Button */
17
+ variant?: ButtonVariant;
18
+ }
19
+ declare const DropdownButton: FC<DropdownButtonProps>;
20
+ export default DropdownButton;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { IconTypes } from '../../../../avocado-icons';
3
3
  declare const variants: {
4
4
  readonly Outlined: "outlined";
@@ -8,7 +8,7 @@ export type TagType = (typeof variants)[keyof typeof variants];
8
8
  export type TagSize = 'sm' | 'lg';
9
9
  export interface ITag {
10
10
  /** Content of the component tag */
11
- children?: React.ReactNode;
11
+ children?: ReactNode;
12
12
  /** Overwrite className */
13
13
  className?: string;
14
14
  /** Disabled state */
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ import Divider from './components/divider/Divider';
15
15
  import Donut from './components/donut/Donut';
16
16
  import DonutLabels from './components/donut/donut-labels/DonutLabels';
17
17
  import DonutLegend from './components/donut/donut-legend/DonutLegend';
18
+ import DropdownButton from './components/dropdown-button/DropdownButton';
18
19
  import Heading from './components/heading/Heading';
19
20
  import Link from './components/link/Link';
20
21
  import Menu from './components/menu/Menu';
@@ -37,7 +38,7 @@ import TextField from './components/text-field/TextField';
37
38
  import Timer from './components/timer/Timer';
38
39
  import Toaster from './components/toaster/Toaster';
39
40
  import Tooltip from './components/tooltip/Tooltip';
40
- export { Box, Breadcrumbs, Button, Card, CardNotification, Checkbox, DataTable, DatePicker, Divider, Donut, DonutLabels, DonutLegend, Heading, Link, Menu, Pager, Pill, Processing, ProgressBar, RadioButton, RoundButton, Select, SelectPagination, SkeletonBase, SkeletonCircle, Stepper, Switch, Tabs, Tag, Text, TextField, ThemeProvider, ThemeStore, Timer, Toaster, Tooltip, };
41
+ export { Box, Breadcrumbs, Button, Card, CardNotification, Checkbox, DataTable, DatePicker, Divider, Donut, DonutLabels, DonutLegend, DropdownButton, Heading, Link, Menu, Pager, Pill, Processing, ProgressBar, RadioButton, RoundButton, Select, SelectPagination, SkeletonBase, SkeletonCircle, Stepper, Switch, Tabs, Tag, Text, TextField, ThemeProvider, ThemeStore, Timer, Toaster, Tooltip, };
41
42
  /**
42
43
  * Types
43
44
  */