fleet/frontend/components/EmptyTable/EmptyTable.stories.tsx
2023-05-03 17:51:33 +01:00

49 lines
953 B
TypeScript

import React from "react";
import type { Meta, StoryObj } from "@storybook/react";
import Button from "components/buttons/Button";
import EmptyTable from "./EmptyTable";
const meta: Meta<typeof EmptyTable> = {
title: "Components/EmptyTable",
component: EmptyTable,
argTypes: {
className: {
control: "text",
},
},
};
export default meta;
type Story = StoryObj<typeof EmptyTable>;
export const Basic: Story = {
args: {
header: "No Data",
info: "There is no data to display.",
iconName: "alert",
},
};
export const WithAdditionalInfo: Story = {
args: {
...Basic.args,
additionalInfo: "You can add additional info here.",
},
};
export const WithPrimaryButton: Story = {
args: {
...WithAdditionalInfo.args,
primaryButton: <Button>ok</Button>,
},
};
export const WithSecondaryButton: Story = {
args: {
...WithPrimaryButton.args,
secondaryButton: <Button>cancel</Button>,
},
};