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