@getsoren/design-system 4.44.0 → 4.45.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.
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps } from '../../Inputs/Button';
|
|
3
|
+
export interface EmptyStateProps<RootComponent extends ElementType = "button"> {
|
|
4
|
+
/** Illustration displayed above the description. Defaults to the empty state illustration. */
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
/** Main message explaining the empty state */
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
/** Label of the action button. The button is only rendered when provided. */
|
|
9
|
+
actionLabel?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Props forwarded to the action button. Polymorphic like the Button component:
|
|
12
|
+
* pass a routing component via `component` (e.g. `{ component: Link, to: "/home" }`).
|
|
13
|
+
*/
|
|
14
|
+
actionProps?: ButtonProps<RootComponent>;
|
|
15
|
+
/** Free slot rendered below the action button for fully custom content */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Centered empty state with an illustration, a description and an optional action button.
|
|
20
|
+
* The action button accepts any root component, so consumers can plug their router link
|
|
21
|
+
* without coupling the design system to a routing library.
|
|
22
|
+
*/
|
|
23
|
+
declare const EmptyState: <RootComponent extends ElementType = "button">({ icon, description, actionLabel, actionProps, children, }: EmptyStateProps<RootComponent>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default EmptyState;
|
package/dist/src/main.d.ts
CHANGED
|
@@ -39,6 +39,8 @@ export * from './components/Feedback/Dialog/DialogPopper';
|
|
|
39
39
|
export { default as DialogPopper } from './components/Feedback/Dialog/DialogPopper';
|
|
40
40
|
export * from './components/Feedback/Dialog/DialogValidation/DialogValidation';
|
|
41
41
|
export { default as DialogValidation } from './components/Feedback/Dialog/DialogValidation/DialogValidation';
|
|
42
|
+
export type { EmptyStateProps } from './components/Feedback/EmptyState/EmptyState';
|
|
43
|
+
export { default as EmptyState } from './components/Feedback/EmptyState/EmptyState';
|
|
42
44
|
export * from './components/Feedback/Lightbox';
|
|
43
45
|
export { default as Lightbox } from './components/Feedback/Lightbox';
|
|
44
46
|
export * from './components/Inputs/ActionAppBar';
|