import React from "react";
import { AtomCaption } from "native/atoms/Typography/Caption";
import { ITypographyProps } from "native/atoms/Typography/TypographyProps";
import { Meta, Story } from "@storybook/react";
import { theme } from "data/dataMx";

const meta: Meta = {
  title: "React Native/atoms/Typography/Caption",
  component: AtomCaption,
  argTypes: {
    color: {
      control: {
        type: "select",
      },
      options: Object.keys(theme),
    },
  },
  parameters: {
    controls: { expanded: true },
  },
};

export default meta;

const TemplateCaption: Story<ITypographyProps> = (props) => (
  <AtomCaption {...props} />
);

// By passing using the Args format for exported stories, you can control the props for a component for reuse in a test
// https://storybook.js.org/docs/react/workflows/unit-testing
export const Caption = TemplateCaption.bind({});

Caption.args = {
  size: "large",
  text: "Caption Text",
  color: "neutral700",
  align: "left",
  styles: {},
  weight: "regular",
};
