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