mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-18 09:02:11 +03:00
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:
parent
afaa962758
commit
d3bd248d30
@ -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 },
|
||||
};
|
Loading…
Reference in New Issue
Block a user