fix: fix cell border radius on soft focus (#649)
* refactor: add RootDecorator * docs: add EditableCellText stories --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
32
front/src/testing/decorators.tsx
Normal file
32
front/src/testing/decorators.tsx
Normal file
@ -0,0 +1,32 @@
|
||||
import { ApolloProvider } from '@apollo/client';
|
||||
import { Decorator } from '@storybook/react';
|
||||
import { RecoilRoot } from 'recoil';
|
||||
|
||||
import { RecoilScope } from '../modules/recoil-scope/components/RecoilScope';
|
||||
import { CellContext } from '../modules/ui/tables/states/CellContext';
|
||||
import { RowContext } from '../modules/ui/tables/states/RowContext';
|
||||
|
||||
import { ComponentStorybookLayout } from './ComponentStorybookLayout';
|
||||
import { mockedClient } from './mockedClient';
|
||||
|
||||
export const RootDecorator: Decorator = (Story) => (
|
||||
<RecoilRoot>
|
||||
<ApolloProvider client={mockedClient}>
|
||||
<Story />
|
||||
</ApolloProvider>
|
||||
</RecoilRoot>
|
||||
);
|
||||
|
||||
export const ComponentDecorator: Decorator = (Story) => (
|
||||
<ComponentStorybookLayout>
|
||||
<Story />
|
||||
</ComponentStorybookLayout>
|
||||
);
|
||||
|
||||
export const CellPositionDecorator: Decorator = (Story) => (
|
||||
<RecoilScope SpecificContext={RowContext}>
|
||||
<RecoilScope SpecificContext={CellContext}>
|
||||
<Story />
|
||||
</RecoilScope>
|
||||
</RecoilScope>
|
||||
);
|
||||
Reference in New Issue
Block a user