diff --git a/site/src/components/EmptyState/EmptyState.tsx b/site/src/components/EmptyState/EmptyState.tsx index a36069db4ce4a..5fcff30902189 100644 --- a/site/src/components/EmptyState/EmptyState.tsx +++ b/site/src/components/EmptyState/EmptyState.tsx @@ -1,12 +1,11 @@ -import type { FC, ReactNode } from "react"; +import type { FC, HTMLAttributes, ReactNode } from "react"; -export interface EmptyStateProps { +export interface EmptyStateProps extends HTMLAttributes { /** Text Message to display, placed inside Typography component */ message: string; /** Longer optional description to display below the message */ description?: string | ReactNode; cta?: ReactNode; - className?: string; image?: ReactNode; } diff --git a/site/src/components/TableEmpty/TableEmpty.stories.tsx b/site/src/components/TableEmpty/TableEmpty.stories.tsx new file mode 100644 index 0000000000000..b9ddec5e883f4 --- /dev/null +++ b/site/src/components/TableEmpty/TableEmpty.stories.tsx @@ -0,0 +1,57 @@ +import type { Meta, StoryObj } from "@storybook/react"; +import Table from "@mui/material/Table"; +import TableBody from "@mui/material/TableBody"; +import TableContainer from "@mui/material/TableContainer"; +import { CodeExample } from "components/CodeExample/CodeExample"; +import { TableEmpty } from "./TableEmpty"; + +const meta: Meta = { + title: "components/TableEmpty", + component: TableEmpty, + args: { + message: "Unfortunately, there's a radio connected to my brain", + }, + decorators: [ + (Story) => ( + + + + + +
+
+ ), + ], +}; + +export default meta; +type Story = StoryObj; + +export const Example: Story = {}; + +export const WithImageAndCta: Story = { + name: "With Image and CTA", + args: { + description: "A gruff voice crackles to life on the intercom.", + cta: ( + + ), + image: ( + + ), + style: { paddingBottom: 0 }, + }, +}; diff --git a/site/src/components/TableLoader/TableLoader.stories.tsx b/site/src/components/TableLoader/TableLoader.stories.tsx new file mode 100644 index 0000000000000..29d14f1eb069f --- /dev/null +++ b/site/src/components/TableLoader/TableLoader.stories.tsx @@ -0,0 +1,27 @@ +import type { Meta, StoryObj } from "@storybook/react"; +import Table from "@mui/material/Table"; +import TableBody from "@mui/material/TableBody"; +import TableContainer from "@mui/material/TableContainer"; +import { TableLoader } from "./TableLoader"; + +const meta: Meta = { + title: "components/TableLoader", + component: TableLoader, + decorators: [ + (Story) => ( + + + + + +
+
+ ), + ], +}; + +export default meta; +type Story = StoryObj; + +export const Example: Story = {}; +export { Example as TableLoader };