import React, { useState } from "react";
import {
  Title,
  Subtitle,
  Description,
  Primary,
} from "@storybook/addon-docs/blocks";
import { Container } from "../../../../src/atoms/container";
import {
  Toggle
} from "../../../../src/atoms/toggle";
import {NavLink} from "../../../../src";

export default {
  title: "Components/Toggle",
  component: Toggle,
  parameters: {
    docs: {
      page: () => (
        <>
          <Title>Readme</Title>
          <br />
          <Subtitle>
            Note, thise story is explains more about the basic usage of the
            component in your project, how to import and render it. You may find
            examples of code at the story Example.
          </Subtitle>
          <Description>
            Use `Range` when you want to glorified checkbox.
          </Description>
          <NavLink href="http://design.seturon.io/?path=/docs/components-toggle--example">
            Example
          </NavLink>
        </>
      ),
    },
  },
  args: {
  },
  argTypes: {
    props: {
      description: null,
      table: {
        type: {
          summary: null,
          detail: null,
        },
      },
      control: {
        type: null,
      },
    },
  },
};

export const Example = () => {
  return (
    <Container>
      <Toggle />
      <Toggle checked />
    </Container>
  );
};


Example.storyName = "Example";

Example.parameters = {
  component: Toggle,
  docs: {
    page: () => (
      <>
        <Title>Example</Title>
        <Description>
          An elegant, accessible toggle component for React. Also a glorified checkbox.
        </Description>
        <br />
        <Subtitle>
          Check the code below to get an idea of how to use it at your product👇
        </Subtitle>
        <Primary name="Example" />
      </>
    ),
  },
};
