Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

Commit

Permalink
improve story definition syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhmarsh committed Dec 27, 2021
1 parent 0d7f208 commit 278eb08
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/exhibition-badge/exhibition-badge.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import html from "../../../.storybook/helpers/html";
export default { title: "Components/ExhibitionBadge" };

const exhibitionBadgeMarkUp = (closingSoon, hover) => html`
const exhibitionBadgeMarkUp = ({ closingSoon, hover }) => html`
<div class='exhibition-badge
${closingSoon ? "exhibition-badge--closing-soon" : "exhibition-badge--just-opened"}
${hover ? "is-color" : ""}'>
Expand All @@ -10,25 +10,25 @@ const exhibitionBadgeMarkUp = (closingSoon, hover) => html`
</span>
</div>`;

export const JustOpened = ({ closingSoon, hover }) => exhibitionBadgeMarkUp(closingSoon, hover);
export const JustOpened = exhibitionBadgeMarkUp.bind({});
JustOpened.args = {
closingSoon: false,
hover: false
};

export const JustOpenedHover = ({ closingSoon, hover }) => exhibitionBadgeMarkUp(closingSoon, hover);
export const JustOpenedHover = exhibitionBadgeMarkUp.bind({});
JustOpenedHover.args = {
closingSoon: false,
hover: true
};

export const ClosingSoon = ({ closingSoon, hover }) => exhibitionBadgeMarkUp(closingSoon, hover);
export const ClosingSoon = exhibitionBadgeMarkUp.bind({});
ClosingSoon.args = {
closingSoon: true,
hover: false
};

export const ClosingSoonHover = ({ closingSoon, hover }) => exhibitionBadgeMarkUp(closingSoon, hover);
export const ClosingSoonHover = exhibitionBadgeMarkUp.bind({});
ClosingSoonHover.args = {
closingSoon: true,
hover: true
Expand Down

0 comments on commit 278eb08

Please sign in to comment.