Skip to content

Commit 8609784

Browse files
committed
Fix /docs/themes--page links
1 parent 3e45acc commit 8609784

File tree

2 files changed

+139
-13
lines changed

2 files changed

+139
-13
lines changed

src/theme/themes.mdx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
import { Meta, Canvas } from '@storybook/blocks';
22
import { ThemeProvider } from 'styled-components';
3+
import * as ThemeStories from './themes.stories';
34

45
import { lightTheme, darkTheme, GlobalStyles } from './';
5-
import {
6-
Button,
7-
Meeting,
8-
PrimaryButton,
9-
Roster,
10-
RosterGroup,
11-
RosterHeader,
12-
RosterCell,
13-
SecondaryButton,
14-
Flex,
15-
} from '../';
16-
17-
<Meta title="Themes" />
6+
import { Button } from '../components/ui/Button';
7+
import PrimaryButton from '../components/ui/Button/PrimaryButton';
8+
import SecondaryButton from '../components/ui/Button/SecondaryButton';
9+
import Meeting from '../components/ui/icons/Meeting';
10+
import { Roster } from '../components/ui/Roster';
11+
import RosterGroup from '../components/ui/Roster/RosterGroup';
12+
import RosterHeader from '../components/ui/Roster/RosterHeader';
13+
import RosterCell from '../components/ui/Roster/RosterCell';
14+
import Flex from '../components/ui/Flex';
15+
16+
<Meta of={ThemeStories} />
1817

1918
# Themes
2019

src/theme/themes.stories.tsx

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
import React from 'react';
2+
import type { Meta, StoryObj } from '@storybook/react';
3+
import { ThemeProvider } from 'styled-components';
4+
5+
import { lightTheme, darkTheme, GlobalStyles } from './';
6+
import { Button } from '../components/ui/Button';
7+
import PrimaryButton from '../components/ui/Button/PrimaryButton';
8+
import SecondaryButton from '../components/ui/Button/SecondaryButton';
9+
import Meeting from '../components/ui/icons/Meeting';
10+
import { Roster } from '../components/ui/Roster';
11+
import RosterGroup from '../components/ui/Roster/RosterGroup';
12+
import RosterHeader from '../components/ui/Roster/RosterHeader';
13+
import RosterCell from '../components/ui/Roster/RosterCell';
14+
import Flex from '../components/ui/Flex';
15+
16+
const meta: Meta = {
17+
title: 'Themes',
18+
parameters: {
19+
docs: {
20+
page: null,
21+
},
22+
},
23+
};
24+
25+
export default meta;
26+
27+
type Story = StoryObj;
28+
29+
export const LightThemeButtons: Story = {
30+
render: () => (
31+
<ThemeProvider theme={lightTheme}>
32+
<GlobalStyles />
33+
<Flex container alignItems="center" justifyContent="space-around">
34+
<Button label="Basic button" />
35+
<PrimaryButton label="Primary" icon={<Meeting />} />
36+
<SecondaryButton label="This is a secondary button" />
37+
</Flex>
38+
</ThemeProvider>
39+
),
40+
name: 'Light Theme - Buttons',
41+
};
42+
43+
export const DarkThemeButtons: Story = {
44+
render: () => (
45+
<ThemeProvider theme={darkTheme}>
46+
<GlobalStyles />
47+
<Flex container alignItems="center" justifyContent="space-around">
48+
<Button label="Basic button" />
49+
<PrimaryButton label="Primary" icon={<Meeting />} />
50+
<SecondaryButton label="This is a secondary button" />
51+
</Flex>
52+
</ThemeProvider>
53+
),
54+
name: 'Dark Theme - Buttons',
55+
};
56+
57+
export const LightThemeRoster: Story = {
58+
render: () => (
59+
<ThemeProvider theme={lightTheme}>
60+
<GlobalStyles />
61+
<Roster>
62+
<RosterHeader
63+
title="Present"
64+
badge={2}
65+
onClose={() => {}}
66+
searchValue="Michael"
67+
onSearch={() => {}}
68+
/>
69+
<RosterGroup>
70+
<RosterCell
71+
name="Michael Scott"
72+
subtitle="Regional Manager"
73+
muted={false}
74+
videoEnabled={true}
75+
/>
76+
<RosterCell
77+
name="Michael Scarn"
78+
subtitle="FBI agent"
79+
muted={true}
80+
videoEnabled={false}
81+
/>
82+
</RosterGroup>
83+
<RosterGroup title="Left" badge={2}>
84+
<RosterCell name="Dwight" subtitle="Assistant regional manager" />
85+
<RosterCell name="Mike the Magic" subtitle="Magician" />
86+
</RosterGroup>
87+
</Roster>
88+
</ThemeProvider>
89+
),
90+
name: 'Light Theme - Roster',
91+
};
92+
93+
export const DarkThemeRoster: Story = {
94+
render: () => (
95+
<ThemeProvider theme={darkTheme}>
96+
<GlobalStyles />
97+
<Roster>
98+
<RosterHeader
99+
title="Present"
100+
badge={2}
101+
onClose={() => {}}
102+
searchValue="Michael"
103+
onSearch={() => {}}
104+
/>
105+
<RosterGroup>
106+
<RosterCell
107+
name="Michael Scott"
108+
subtitle="Regional Manager"
109+
muted={false}
110+
videoEnabled={true}
111+
/>
112+
<RosterCell
113+
name="Michael Scarn"
114+
subtitle="FBI agent"
115+
muted={true}
116+
videoEnabled={false}
117+
/>
118+
</RosterGroup>
119+
<RosterGroup title="Left" badge={2}>
120+
<RosterCell name="Dwight" subtitle="Assistant regional manager" />
121+
<RosterCell name="Mike the Magic" subtitle="Magician" />
122+
</RosterGroup>
123+
</Roster>
124+
</ThemeProvider>
125+
),
126+
name: 'Dark Theme - Roster',
127+
};

0 commit comments

Comments
 (0)