import React from "react";
import { Meta, Story } from "@storybook/react";
import { MoleculeBanner, IBannerProps } from "react/molecules/Banner";
import { theme } from "data/dataMx";

const meta: Meta = {
  title: "React/molecules/Banner",
  component: MoleculeBanner,
  argTypes: {
    titleColor: {
      control: {
        type: "select",
      },
      options: Object.keys(theme),
    },
  },
  parameters: {
    controls: { expanded: true },
  },
};

export default meta;

const TemplateBanner: Story<IBannerProps> = (props) => {
  return <MoleculeBanner {...props} />;
};

export const Banner = TemplateBanner.bind({});

Banner.args = {
  image:
    "https://prod-drupal.abi-rewards.de/sites/g/files/wnfebl4411/files/2022-04/join1_0%20%281%29.png",
  title: "$1 spent = 10 points",
  text: "Buy beer at ANY participating establishment, scan the receipt and earn up 10 points for every dollar.",
  textPosition: "left",
};
