Skip to content

Commit

Permalink
Update preview.stories.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanKolnik committed Apr 6, 2022
1 parent 99af5e5 commit 57f8598
Showing 1 changed file with 45 additions and 2 deletions.
47 changes: 45 additions & 2 deletions lib/ui/src/components/preview/preview.stories.tsx
Expand Up @@ -130,9 +130,52 @@ export const HideAllDefaultTools = () => (
export const WithCanvasTab = () => (
<Consumer>
{({ api }: Combo) => {
return <Preview {...previewProps} api={{ ...api, getElements: () => ({}) }} />;
return (
<Preview
{...previewProps}
api={{
...api,
getElements: () => ({}),
}}
/>
);
}}
</Consumer>
);

export const WithTabs = () => (
<Consumer>
{({ api }: Combo) => {
return (
<Preview
{...previewProps}
api={{
...api,
getElements: () => ({}),
getQueryParam: () => '',
}}
/>
);
}}
</Consumer>
);

export const WithTabs = () => <Preview {...previewProps} />;
export const WithToolbarExclusions = () => (
<Consumer>
{({ api }: Combo) => {
return (
<Preview
{...previewProps}
api={{
...api,
getElements: () => ({}),
getQueryParam: (key) => {
const params = { toolbarExclude: 'canvas,fullscreen' };
return params[key];
},
}}
/>
);
}}
</Consumer>
);

0 comments on commit 57f8598

Please sign in to comment.