Skip to content

Commit

Permalink
fix: ally story context
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed May 21, 2020
1 parent 409fdec commit 81d6ffb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
23 changes: 17 additions & 6 deletions plugins/axe-plugin/src/stories/AllyBlock.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
import React from 'react';
import { Store } from '@component-controls/store';
import { BlockContextProvider, store } from '@component-controls/blocks';
import { AxeAllyBlock } from '../index';
import { MockContext } from '@component-controls/blocks';

export default {
title: 'Plugins/AxeAllyBlock',
component: AxeAllyBlock,
};

export const overview = () => (
<MockContext storyId="blocks-core-story-plain--controls">
<AxeAllyBlock id="." />
</MockContext>
);
export const overview = () => {
const storyStore = React.useMemo(
() => new Store({ store, updateLocalStorage: false }),
[],
);
return (
<BlockContextProvider
storyId="blocks-core-story-plain--controls"
store={storyStore}
>
<AxeAllyBlock id="." />
</BlockContextProvider>
);
};
1 change: 1 addition & 0 deletions ui/blocks/src/test/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './MockContext';
export * from './storyStore';

0 comments on commit 81d6ffb

Please sign in to comment.