import Divider from "../Divider";
import { ArgsTable, Canvas, Meta, Story } from "@storybook/addon-docs";
import { createStoryMetaSettings } from "../../../storybook";
import { TAG, ICONS, LABEL } from "../../../storybook/components/related-components/component-description-map";
import classes from "./Divider.stories.module.scss";

export const metaSettings = createStoryMetaSettings({
  component: Divider,
  enumPropNamesArray: ["direction"]
});

<Meta
  title="Data display/Divider - (Coming Soon)"
  component={Divider}
  argTypes={metaSettings.argTypes}
  decorators={metaSettings.decorators}
/>

<!--- Component template -->

export const dividerTemplate = args => (
  <div style={{ width: "400px", height: "40px" }}>
    <Divider {...args} />
  </div>
);

<!--- Component documentation -->

# Divider

- [Overview](#overview)
- [Props](#props)
- [Variants](#variants)
- [Feedback](#feedback)

## Overview

Divider create separation between two UI elements

<Canvas>
  <Story name="Overview">{dividerTemplate.bind({})}</Story>
</Canvas>

## Props

<ArgsTable story={"Overview"} />

## Variants

### Directions

<Canvas>
  <Story name="Directions">
    <div style={{ display: "flex", flexDirection: "column", width: "400px" }}>
      <div className={classes["divider-description-container"]} style={{ height: 40 }}>
        <span className={classes["divider-description-text"]}>Horizontal</span>
        <Divider direction={Divider.directions.HORIZONTAL} />
      </div>
      <div className={classes["divider-description-container"]}>
        <span className={classes["divider-description-text"]}>Vertical</span>
        <Divider direction={Divider.directions.VERTICAL} className={classes["divider-description-horizontal"]} />
      </div>
    </div>
  </Story>
</Canvas>

## Related components

<RelatedComponents componentsNames={[LABEL, ICONS, TAG]} />
