import * as React from "react"
import { ThemeProvider } from "styled-components"
import { storiesOf } from "@storybook/react"
import { action } from "@storybook/addon-actions"
import theme from "../../../theme"
import * as Toast from ".."

storiesOf("Toast", module)
  .addDecorator((story) => (
    <ThemeProvider theme={theme}>
      {story()}
    </ThemeProvider>
  ))
  .add("success", () => (
    <Toast.Success
      style={{ margin: 30 }}
      message={"payment/quest/daily-active"}
      params={{ silver: 100 }}
      onClose={action("close")}
    />
  ))
  .add("error", () => (
    <Toast.Error style={{ margin: 30 }} message="error" onClose={action("close")} />
  ))
