import { Meta, Preview, Props, Story } from "@storybook/addon-docs/blocks";
import { select, withKnobs } from "@storybook/addon-knobs";
import Heading from "../../Heading";

<Meta title="Heading" component={Heading} decorators={[withKnobs]} />

# Heading

Some MDX docs for the `Heading` component.

## Demo

<Preview>
  <Story name="Demo" parameters={{
    docs: {
      disable: true
    },
    options: {
      showPanel: true
    }
  }}>
    {{
      components: {
        "h-heading": Heading,
      },
      props: {
        as: {
          default: select(
            "as",
            {
              hero: "hero",
              h1: "h1",
              h2: "h2",
              h3: "h3",
              h4: "h4",
              h5: "h5",
              h6: "h6"
            },
            "hero"
          ),
        },
      },
      template: `<h-heading :as="as">Heading {{ as }}</h-heading>`,
    }}
  </Story>
</Preview>

<Preview>
  <Story name="Levels" parameters={{
    docs: {
      disable: false
    },
    options: {
      showPanel: false
    }
  }}>
    {{
      components: {
        "h-heading": Heading,
      },
      template: `
        <div>
          <h-heading as="hero">Heading Hero</h-heading>
          <h-heading as="h1">Heading h1</h-heading>
          <h-heading as="h2">Heading h2</h-heading>
          <h-heading as="h3">Heading h3</h-heading>
          <h-heading as="h4">Heading h4</h-heading>
          <h-heading as="h5">Heading h5</h-heading>
          <h-heading as="h6">Heading h6</h-heading>
        </div>
      `,
    }}
  </Story>
</Preview>

## Props

<Props of={Heading} />
