Skip to content

Commit 18db337

Browse files
docs(ui): add stories for Accessibility page (#2301)
1 parent 9dc8512 commit 18db337

File tree

3 files changed

+88
-1
lines changed

3 files changed

+88
-1
lines changed

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const config = {
99
'storybook-i18n',
1010
],
1111
framework: '@storybook-vue/nuxt',
12-
staticDirs: ['./.public'],
12+
staticDirs: ['./.public', { from: '../public', to: '/' }],
1313
features: {
1414
backgrounds: false,
1515
},

.storybook/preview-head.html

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,61 @@
11
<style>
2+
/* Load Geist fonts to match the production app (normally handled by @nuxt/fonts,
3+
which is disabled in Storybook at this time) */
4+
@font-face {
5+
font-family: 'Geist';
6+
font-weight: 400;
7+
font-style: normal;
8+
font-display: swap;
9+
src: url('/fonts/Geist-Regular.ttf') format('truetype');
10+
}
11+
@font-face {
12+
font-family: 'Geist';
13+
font-weight: 500;
14+
font-style: normal;
15+
font-display: swap;
16+
src: url('/fonts/Geist-Medium.ttf') format('truetype');
17+
}
18+
@font-face {
19+
font-family: 'Geist';
20+
font-weight: 600;
21+
font-style: normal;
22+
font-display: swap;
23+
src: url('/fonts/Geist-SemiBold.ttf') format('truetype');
24+
}
25+
@font-face {
26+
font-family: 'Geist';
27+
font-weight: 700;
28+
font-style: normal;
29+
font-display: swap;
30+
src: url('/fonts/Geist-Bold.ttf') format('truetype');
31+
}
32+
@font-face {
33+
font-family: 'Geist Mono';
34+
font-weight: 400;
35+
font-style: normal;
36+
font-display: swap;
37+
src: url('/fonts/GeistMono-Regular.ttf') format('truetype');
38+
}
39+
@font-face {
40+
font-family: 'Geist Mono';
41+
font-weight: 500;
42+
font-style: normal;
43+
font-display: swap;
44+
src: url('/fonts/GeistMono-Medium.ttf') format('truetype');
45+
}
46+
@font-face {
47+
font-family: 'Geist Mono';
48+
font-weight: 700;
49+
font-style: normal;
50+
font-display: swap;
51+
src: url('/fonts/GeistMono-Bold.ttf') format('truetype');
52+
}
53+
html {
54+
-webkit-font-smoothing: antialiased;
55+
-moz-osx-font-smoothing: grayscale;
56+
text-rendering: optimizeLegibility;
57+
}
58+
259
/* Override docs story canvas background to match npmx theme */
360
.docs-story {
461
background-color: var(--bg, oklch(0.171 0 0)) !important;

app/pages/accessibility.stories.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import Accessibility from './accessibility.vue'
2+
import type { Meta, StoryObj } from '@storybook-vue/nuxt'
3+
import AppHeader from '~/components/AppHeader.vue'
4+
import AppFooter from '~/components/AppFooter.vue'
5+
6+
const meta = {
7+
component: Accessibility,
8+
parameters: {
9+
layout: 'fullscreen',
10+
},
11+
decorators: [
12+
() => ({
13+
components: { AppHeader, AppFooter },
14+
template: `
15+
<div class="min-h-screen flex flex-col bg-bg text-fg">
16+
<AppHeader :show-logo="true" />
17+
<div id="main-content" class="flex-1 flex flex-col" tabindex="-1">
18+
<story />
19+
</div>
20+
<AppFooter />
21+
</div>
22+
`,
23+
}),
24+
],
25+
} satisfies Meta<typeof Accessibility>
26+
27+
export default meta
28+
type Story = StoryObj<typeof meta>
29+
30+
export const Default: Story = {}

0 commit comments

Comments
 (0)