import type { Meta, StoryObj } from "@storybook/react";
import type { SVGProps } from "./SVG";
import { SVG } from "./SVG";

type StoryType = StoryObj<typeof SVG>;

const meta: Meta<typeof SVG> = {
  title: "Components/SVG",
  component: SVG,
};

const Star = (
  <svg viewBox="0 0 51 48">
    <path
      fill="none"
      stroke="#000"
      d="m25,1 6,17h18l-14,11 5,17-15-10-15,10 5-17-14-11h18z"
    />
  </svg>
);

export const Default: StoryType = {
  render: (args: SVGProps) => <SVG {...args}>{Star}</SVG>,
  args: {
    style: {
      width: 75,
      height: 75,
    },
  },
};

export default meta;
