import { Meta, Preview, Props, Story } from "@storybook/addon-docs/blocks";
import { number, select } from "@storybook/addon-knobs";
import Pill from "../../Pill";

<Meta title="Pills" />

# Pills

<Story name="Demo" parameters={{
  docs: {
    disable: true
  },
  options: {
    showPanel: true
  }
}}>
    {{
      components: {
        "h-pill": Pill,
      },
      props: {
        value: {
          default: number(
            "value",
            "1",
            {
              range: true,
              min: 0,
              max: 199,
              step: 1,
            }
          ),
        },
        size: {
          default: select(
            "size",
            {
              Small: "small",
              Medium: "medium",
              Large: "large"
            },
            "small"
          ),
        },
        variant: {
          default: select(
            "variant",
            {
              Pacific: "pacific",
              Fiord: "fiord",
              Sandy: "sandy",
              Paradiso: "paradiso",
              Demask: "demask",
              White: "white",
            },
            "pacific",
          ),
        },
      },
      template: `<h-pill :variant="variant" :value="value" :size="size" />`,
    }}
</Story>

<Preview>
  <Story name="Docs">
    {{
      components: {
        "h-pill": Pill
      },
      template: `
        <div>
          <h-pill value="1" size="small" class="sb-pill" />
          <h-pill value="1" size="medium" class="sb-pill" />
          <h-pill value="1" size="large" class="sb-pill" />
        </div>
      `
    }}
  </Story>
</Preview>

<Props of={Pill} />
