Initial commit

This commit is contained in:
Tom Lerendu 2021-06-16 14:09:26 +01:00
commit 7878e653a0
253 changed files with 24552 additions and 0 deletions

View 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>
)
}

View 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>
)
}

View 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
View 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
View 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 />
</>
),
];