-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(component): Add Astrobook integration
Preview component per-component design.
- Loading branch information
Showing
5 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
import type { AstroIntegration } from "astro"; | ||
import { defineConfig } from "astro/config"; | ||
import astrobook from "astrobook"; | ||
|
||
export default defineConfig({}); | ||
const integrations: AstroIntegration[] = []; | ||
|
||
if (process.env.ASTROBOOK) { | ||
integrations.push(astrobook({ directory: "src/components" })); | ||
} | ||
|
||
export default defineConfig({ integrations }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Bio from "./Bio.astro"; | ||
import * as stories from "./story.ts"; | ||
|
||
export default { | ||
title: "Bio", | ||
component: Bio, | ||
}; | ||
|
||
export const Default = { args: stories.Default }; | ||
export const Japanese = { args: stories.Japanese }; | ||
export const Long = { args: stories.Long }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import type { Props } from "./Bio.astro"; | ||
|
||
export const Default: Props = { | ||
name: "Bio Name", | ||
description: "Bio Description", | ||
icon: "https://github.com/withastro.png", | ||
}; | ||
|
||
export const Japanese: Props = { | ||
name: "名前", | ||
description: "説明", | ||
icon: "https://github.com/withastro.png", | ||
}; | ||
|
||
export const Long: Props = { | ||
name: "Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Bio Name", | ||
description: | ||
"Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Bio Description", | ||
icon: "https://github.com/withastro.png", | ||
}; |