Skip to content

Commit

Permalink
fix: remove icon on non docs viewmode stories
Browse files Browse the repository at this point in the history
andresin87 committed Sep 29, 2023
1 parent cc83f43 commit 18cb8ec
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .storybook/preview.jsx
Original file line number Diff line number Diff line change
@@ -50,15 +50,17 @@ export const decorators = [
defaultTheme: 'light',
attributeName: 'data-theme',
}),
(Story, args) => (
(Story, { id, viewMode }) => (
<div className="relative w-full">
<div className="absolute -right-lg -top-xl">
<a href={`/iframe.html?&id=${args.id}`} target="_blank">
<Icon size="sm" label="expand">
<ShareExpand />
</Icon>
</a>
</div>
{viewMode === 'docs' && (
<div className="absolute -right-lg -top-xl">
<a href={`/iframe.html?&id=${id}`} target="_blank">
<Icon size="sm" label="expand">
<ShareExpand />
</Icon>
</a>
</div>
)}
<Story />
</div>
),

0 comments on commit 18cb8ec

Please sign in to comment.