Skip to content

Commit 8fc9bb4

Browse files
committed
add story for BugBountyBanner component [Fixes #13044]
1 parent 40afdc0 commit 8fc9bb4

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from "react"
2+
import { Meta, StoryObj } from "@storybook/react"
3+
4+
import BugBountyBanner from "../Banners/BugBountyBanner"
5+
import DismissableBanner from "../Banners/DismissableBanner"
6+
7+
const meta = {
8+
component: BugBountyBanner,
9+
title: "BugBountyBanner",
10+
} satisfies Meta<typeof BugBountyBanner>
11+
12+
export default meta
13+
14+
const bugBountyBannerStoryPageKey = "bugBountyBannerStoryPageKey"
15+
16+
export const BugBountyBannerStory: StoryObj<typeof meta> = {
17+
args: {},
18+
play: () => {
19+
localStorage.setItem(bugBountyBannerStoryPageKey, "false")
20+
},
21+
render: () => {
22+
return (
23+
<DismissableBanner storageKey={bugBountyBannerStoryPageKey}>
24+
<BugBountyBanner />
25+
</DismissableBanner>
26+
)
27+
},
28+
}

0 commit comments

Comments
 (0)