diff --git a/packages/react-components/src/components/EmptyState/EmptyState.stories.tsx b/packages/react-components/src/components/EmptyState/EmptyState.stories.tsx
index fe3f09920..00a0671f2 100644
--- a/packages/react-components/src/components/EmptyState/EmptyState.stories.tsx
+++ b/packages/react-components/src/components/EmptyState/EmptyState.stories.tsx
@@ -137,7 +137,7 @@ export const WithCustomContentAndNoIllustration: Story = {
- Facebook Messanger
+ Facebook Messenger
diff --git a/packages/react-components/src/components/EmptyState/types.ts b/packages/react-components/src/components/EmptyState/types.ts
index b806eae1d..89811babe 100644
--- a/packages/react-components/src/components/EmptyState/types.ts
+++ b/packages/react-components/src/components/EmptyState/types.ts
@@ -2,20 +2,59 @@ import { ReactNode } from 'react';
export type IEmptyStateProps = (
| {
+ /**
+ * Specify the empty state type
+ */
type?: 'full';
+ /**
+ * The empty state description text or element
+ */
description?: string | ReactNode;
}
| {
+ /**
+ * Specify the empty state type
+ */
type: 'inline';
+ /**
+ * Description is not available in inline type
+ */
description?: never;
+ /**
+ * Image is not available in inline type
+ */
image?: never;
}
) & {
+ /**
+ * The empty state title
+ */
title: string;
+ /**
+ * Optional actions to be displayed
+ */
actions?: ReactNode;
+ /**
+ * Set to center the content
+ */
centered?: boolean;
} & (
- | { image?: string; icon?: never }
- | { image?: never; icon?: ReactNode }
- | { image?: never; icon?: never }
+ | {
+ /**
+ * The URL of the empty state image
+ */
+ image?: string;
+ icon?: never;
+ }
+ | {
+ image?: never;
+ /**
+ * The icon element to be displayed
+ */
+ icon?: ReactNode;
+ }
+ | {
+ image?: never;
+ icon?: never;
+ }
);