2020-09-02 20:30:47 +03:00
|
|
|
import React from 'react';
|
|
|
|
import styled from 'styled-components';
|
2020-09-09 17:35:22 +03:00
|
|
|
import { Story } from '@storybook/react';
|
2020-09-02 20:30:47 +03:00
|
|
|
import Notification from './';
|
2020-09-09 17:35:22 +03:00
|
|
|
import { NotificationProps } from './Notification';
|
2020-09-02 20:30:47 +03:00
|
|
|
|
|
|
|
const Container = styled.div`
|
|
|
|
display: flex;
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Notification',
|
|
|
|
component: Notification,
|
|
|
|
};
|
|
|
|
|
2020-09-09 17:35:22 +03:00
|
|
|
const Template: Story<NotificationProps> = (args) => (
|
2020-09-02 20:30:47 +03:00
|
|
|
<Container>
|
|
|
|
<Notification {...args} />
|
|
|
|
</Container>
|
|
|
|
);
|
|
|
|
|
|
|
|
export const Default = Template.bind({});
|
|
|
|
Default.args = {
|
|
|
|
type: 'warning',
|
|
|
|
children: 'Hello Notification',
|
|
|
|
};
|
|
|
|
Default.argTypes = {
|
|
|
|
onClose: { control: { disable: true } },
|
|
|
|
theme: { control: { disable: true } },
|
|
|
|
};
|