Initial commit
This commit is contained in:
commit
7878e653a0
253 changed files with 24552 additions and 0 deletions
12
.storybook/decorators/ContextMenuDecorator.tsx
Normal file
12
.storybook/decorators/ContextMenuDecorator.tsx
Normal file
|
@ -0,0 +1,12 @@
|
|||
import React from 'react';
|
||||
import { ContextMenuProvider } from '../../src/providers/ContextMenuProvider';
|
||||
|
||||
export default function ContextMenuDecorator(
|
||||
component: any,
|
||||
) {
|
||||
return (
|
||||
<ContextMenuProvider>
|
||||
{component()}
|
||||
</ContextMenuProvider>
|
||||
)
|
||||
}
|
12
.storybook/decorators/DropdownMenuDecorator.tsx
Normal file
12
.storybook/decorators/DropdownMenuDecorator.tsx
Normal file
|
@ -0,0 +1,12 @@
|
|||
import React from 'react';
|
||||
import { DropdownMenuProvider } from '../../src/providers/DropdownMenuProvider';
|
||||
|
||||
export default function DropdownMenuDecorator(
|
||||
component: any,
|
||||
) {
|
||||
return (
|
||||
<DropdownMenuProvider>
|
||||
{component()}
|
||||
</DropdownMenuProvider>
|
||||
)
|
||||
}
|
20
.storybook/decorators/FormikDecorator.tsx
Normal file
20
.storybook/decorators/FormikDecorator.tsx
Normal file
|
@ -0,0 +1,20 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Formik } from 'formik';
|
||||
|
||||
export interface FormikDecoratorProps {
|
||||
initialValues: { [key: string]: any },
|
||||
};
|
||||
|
||||
export default function FormikDecorator(
|
||||
component: any,
|
||||
{ args }: any,
|
||||
) {
|
||||
return (
|
||||
<Formik
|
||||
initialValues={args.initialValues}
|
||||
onSubmit={() => { }}
|
||||
>
|
||||
{component()}
|
||||
</Formik>
|
||||
)
|
||||
}
|
12
.storybook/main.js
Normal file
12
.storybook/main.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
module.exports = {
|
||||
'stories': [
|
||||
'../src/**/*.stories.mdx',
|
||||
'../src/**/*.stories.@(js|jsx|ts|tsx)'
|
||||
],
|
||||
'addons': [
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addon-essentials',
|
||||
'@storybook/preset-create-react-app',
|
||||
'@storybook/addon-controls',
|
||||
]
|
||||
};
|
16
.storybook/preview.js
Normal file
16
.storybook/preview.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { GlobalStyles as TwinGlobalStyles } from 'twin.macro';
|
||||
import GlobalStyles from '../src/components/General/Styled/GlobalStyles';
|
||||
|
||||
export const parameters = {
|
||||
actions: { argTypesRegex: '^on[A-Z].*' },
|
||||
};
|
||||
|
||||
export const decorators = [
|
||||
(Story) => (
|
||||
<>
|
||||
<TwinGlobalStyles />
|
||||
<GlobalStyles backgroundColor="white" />
|
||||
<Story />
|
||||
</>
|
||||
),
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue