import { Meta, Preview, Props, Story } from "@storybook/addon-docs/blocks";
import { select, text, withKnobs } from "@storybook/addon-knobs";
import Avatar from "../../Avatar";
import { avatarTemplate } from "./Avatar.data.js";

<Meta title="Avatar" component={Avatar} decorators={[withKnobs]} />

# Avatar


## Demo


<Story name="Demo" parameters={{options:{showPanel:true}}}>
{{
    components: {
      'h-avatar': Avatar
    },
    props: {
      initials: {
        default: text("initials", "UN"),
      },
      size: {
        default: select(
          "size",
          {
            "Extra Small": "xs",
            Small: "s",
            Medium: "m",
            Large: "l",
            "Extra Large": "xl",
            "Extra Extra Large": "xxl",
          },
          "xs",
        ),
      },
      color: {
        default: select(
          "color",
          {
            Pacific: "pacific",
            Paradiso: "paradiso",
            Sandy: "sandy",
            Demask: "demask",
            Fiord: "fiord",
            Cornflower: "cornflower",
            Scampi: "scampi",
            Goldenrod: "goldenrod",
            Deco: "deco",
            Blush: "blush",
            Eggplant: "eggplant",
            Mono: "mono",
          },
        )
      }
    },
    template: `
        ${avatarTemplate}
    `
}}
</Story>

<Props of={Avatar} />
