Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/astro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ jobs:
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
working-directory: ${{ env.BUILD_PATH }}
- name: Build Storybook style guide
run: ${{ steps.detect-package-manager.outputs.runner }} storybook build --output-dir public/styleguide
working-directory: ${{ env.BUILD_PATH }}
- name: Build with Astro
run: |
${{ steps.detect-package-manager.outputs.runner }} astro build \
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ pnpm-debug.log*

# pagefind

public/pagefind
public/pagefind

# storybook

public/styleguide
19 changes: 19 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { StorybookConfig } from "@storybook-astro/framework";
import { react } from "@storybook-astro/framework/integrations";

const config: StorybookConfig = {
stories: [
"../src/stories/**/*.mdx",
"../src/components/**/*.stories.@(ts|tsx)",
"../src/stories/**/*.stories.@(ts|tsx)",
],
addons: ["@storybook/addon-docs", "@storybook/addon-themes"],
framework: {
name: "@storybook-astro/framework",
options: {
integrations: [react()],
},
},
};

export default config;
23 changes: 23 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { definePreview } from "@storybook-astro/framework";
import { withThemeByDataAttribute } from "@storybook/addon-themes";

export default definePreview({
decorators: [
withThemeByDataAttribute({
themes: { light: "light", dark: "dark" },
defaultTheme: "light",
attributeName: "data-theme",
}),
],
parameters: {
layout: "padded",
backgrounds: { disable: true },
viewport: {
viewports: {
mobile: { name: "Mobile", styles: { width: "390px", height: "844px" } },
tablet: { name: "Tablet", styles: { width: "768px", height: "1024px" } },
desktop: { name: "Desktop", styles: { width: "1280px", height: "800px" } },
},
},
},
});
Loading
Loading