import type { Meta, StoryObj } from "@storybook/react"; import { AdminContext, CreateButton, defaultI18nProvider, ResourceContextProvider, } from "react-admin"; import React from "react"; import { dataProvider } from "../../../dataProvider"; const meta = { title: "Buttons/CreateButton", component: CreateButton, args: { label: "Create", }, argTypes: { label: { control: "text", }, variant: { control: "select", options: ["text", "outlined", "contained"], }, icon: { control: "text", }, scrollToTop: { control: "boolean", }, }, decorators: [(Story) => defaultDecorator(Story)], } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { render: ({ ...props }) => { return ; }, }; export const Outlined: Story = { render: ({ ...props }) => { return ; }, args: { variant: "outlined", }, }; export const Filled: Story = { render: ({ ...props }) => { return ; }, args: { variant: "contained", }, }; const defaultDecorator = (Story: () => React.JSX.Element) => { return ( ); };