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

export default {
  title: "Components/Range",
  component: Range,
  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 range inputs for consistent.
          </Description>
          <NavLink href="http://design.seturon.io/?path=/docs/components-range--example">
            Example
          </NavLink>
        </>
      ),
    },
  },
  args: {
  },
  argTypes: {
    props: {
      description: null,
      table: {
        type: {
          summary: null,
          detail: null,
        },
      },
      control: {
        type: null,
      },
    },
  },
};

export const Example = () => {
  return (
    <Container>
      <Range
        type="range"
        min={1}
        max={3}
        step={1}
        onChange={() => {
        }}
      />
    </Container>
  );
};


Example.storyName = "Example";

Example.parameters = {
  component: Range,
  docs: {
    page: () => (
      <>
        <Title>Example</Title>
        <Description>
          Create custom &lt; input type="range &gt; controls. The track (the background) and thumb (the value) are both styled to appear the same across browsers.
        </Description>
        <br />
        <Subtitle>
          Check the code below to get an idea of how to use it at your product👇
        </Subtitle>
        <Primary name="Example" />
      </>
    ),
  },
};
