import type { Meta, StoryObj } from '@storybook/react';
import AddUser from "../../components/SVG/AddUser";
import CreateButton from '../../components/UI/CreateButton/CreateButton';
import NarrowContainer from "../../components/UI/Layout/NarrowContainer";

 /***
 * The basic Create Button story
 */
const meta: Meta<typeof CreateButton> = {
  title:'Components/Misc-Buttons/CreateButton',
  component: CreateButton,
  decorators: [
    (Story) => (
      <NarrowContainer>
          <Story/>
      </NarrowContainer>
    ),
  ],
};


export default meta;
type Story = StoryObj<typeof CreateButton>;
 
 /***
 *The component's icon and text are added as children.
 */

export const CreateButtonEx: Story = {
  args: {
    buttonType: 'button',
    children: [<AddUser/>, <p>Preview Label</p>],
    onClick: () => console.log('clicked'),
  },
  argTypes: {
    onClick: {
       action: "onClick",
    },
  },
};