chore: Add ui/modal stories (#967)

* Add ui/modal stories

Co-authored-by: Matheus <matheus_benini@hotmail.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Matheus <matheus_benini@hotmail.com>

* Fix the formatting

Co-authored-by: Benjamin Mayanja <vibenjamin6@gmail.com>
Co-authored-by: Matheus <matheus_benini@hotmail.com>

---------

Co-authored-by: Matheus <matheus_benini@hotmail.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
This commit is contained in:
gitstart-twenty 2023-07-29 01:42:39 +07:00 committed by GitHub
parent afaa962758
commit d3bd248d30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,35 @@
import styled from '@emotion/styled';
import { Meta, StoryObj } from '@storybook/react';
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
import { Modal } from '../Modal';
const meta: Meta<typeof Modal> = {
title: 'UI/Modal/Modal',
component: Modal,
decorators: [ComponentDecorator],
};
export default meta;
type Story = StoryObj<typeof Modal>;
const StyledContentContainer = styled.div`
color: ${({ theme }) => theme.font.color.primary};
margin: 5px;
padding: ${({ theme }) => theme.spacing(10)};
`;
const args = {
isOpen: true,
children: <StyledContentContainer>Lorem ipsum</StyledContentContainer>,
};
export const Default: Story = {
args,
decorators: [ComponentDecorator],
};
Default.argTypes = {
children: { control: false },
};