Skip to content

Commit

Permalink
chore: Add ui/modal stories (twentyhq#967)
Browse files Browse the repository at this point in the history
* Add ui/modal stories

Co-authored-by: Matheus <[email protected]>

* Add requested changes

Co-authored-by: v1b3m <[email protected]>
Co-authored-by: Matheus <[email protected]>

* Fix the formatting

Co-authored-by: Benjamin Mayanja <[email protected]>
Co-authored-by: Matheus <[email protected]>

---------

Co-authored-by: Matheus <[email protected]>
Co-authored-by: v1b3m <[email protected]>
  • Loading branch information
3 people authored and AdityaPimpalkar committed Aug 4, 2023
1 parent 050a9ea commit 82f0270
Showing 1 changed file with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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 },
};

0 comments on commit 82f0270

Please sign in to comment.