import * as React from "react";
import { storiesOf } from "@storybook/react";
import { CodeSnippet } from "../src/index";
import moment from "moment";
const exampleCode = `
import React, { useState } from "react";

function Example() {
  const [count, setCount] = useState(0);

  return (
    <div>
      <p>You clicked {count} times</p>
        <button onClick={() => setCount(count + 1)}>
        Click me
      </button>
    </div>
  );
}
`.trim();
storiesOf("CodeSnippet", module).add("CodeSnippet", () => {
  return (
    <div id="app-wrapper">
      <div id="app" style={{ padding: "16px" }}>
        <div style={{position:'absolute',top:'40px',left:'80px'}}>
        <CodeSnippet code={exampleCode} type='number' width='400px'>
        </CodeSnippet>

        <CodeSnippet code={exampleCode} style={{width:'400px'}}>
        </CodeSnippet>
        </div>
        </div>
    </div>
  );
});
