"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _react = require("@storybook/react");

var _react2 = _interopRequireDefault(require("react"));

var _ = require(".");

var _Box = require("../Box");

var _Button = require("../Button");

var __jsx = _react2["default"].createElement;
var stories = (0, _react.storiesOf)('Toast', module);
stories.addDecorator(function (story) {
  return __jsx(_Box.Box, {
    maxWidth: "lg",
    mx: "auto",
    mt: 6,
    p: 6
  }, story());
});
stories.add('Default', function () {
  var Toaster = function Toaster() {
    var toast = (0, _.useToast)();
    return __jsx(_Button.Button, {
      onClick: function onClick() {
        return toast({
          title: 'Account created.',
          description: "We've created your account for you.",
          status: 'success',
          duration: 9000,
          isClosable: true
        });
      }
    }, "Show Success Toast");
  };

  return __jsx(Toaster, null);
});
stories.add('Custom Component', function () {
  var Toaster = function Toaster() {
    var toast = (0, _.useToast)();
    return __jsx(_Button.Button, {
      onClick: function onClick() {
        return toast({
          position: 'bottom-left',
          render: function render() {
            return __jsx(_Box.Box, {
              m: 3,
              color: "white",
              p: 3,
              bg: "blue.500"
            }, "Hello World");
          }
        });
      }
    }, "Show Toast");
  };

  return __jsx(Toaster, null);
});
//# sourceMappingURL=examples.js.map