-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGithubPRLink.stories.tsx
More file actions
43 lines (36 loc) · 1.17 KB
/
GithubPRLink.stories.tsx
File metadata and controls
43 lines (36 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import type { Meta, StoryObj } from "@storybook/react";
import { GithubPRLink } from "./GithubPRLink";
import {
GithubPermalinkContext,
GithubPermalinkProvider,
} from "../config/GithubPermalinkContext";
import "../GithubPermalink/github-permalink.css";
const meta: Meta<typeof GithubPRLink> = {
component: GithubPRLink,
};
export default meta;
type Story = StoryObj<typeof GithubPRLink>;
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/react/api/csf
* to learn how to use render functions.
*/
export const Primary: Story = {
render: () => (
<GithubPRLink prLink="https://github.com/facebook/react/pull/24652" />
),
};
export const WithBackground: Story = {
render: () => (
<div style={{ backgroundColor: "pink", padding: "1em" }}>
<GithubPRLink prLink="https://github.com/facebook/react/pull/24652" />
</div>
),
};
export const WithToken: Story = {
render: () => (
<GithubPermalinkProvider githubToken={process.env.STORYBOOK_GITHUB_TOKEN}>
<GithubPRLink prLink="https://github.com/facebook/react/pull/24652" />
</GithubPermalinkProvider>
),
};