Skip to content

Commit 31def74

Browse files
committed
✨ 07
1 parent 65e84c9 commit 31def74

7 files changed

Lines changed: 2708 additions & 15 deletions

File tree

src/components/Sandpack.astro

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Sandpack as Sandpack_ } from "@codesandbox/sandpack-react";
66
type Props = ComponentProps<typeof Sandpack_>;
77
88
const props = Astro.props;
9+
const {options, ...rest} = props;
910
---
1011

1112
<style>
@@ -31,12 +32,14 @@ const props = Astro.props;
3132
client:only="react"
3233
options={{
3334
showInlineErrors: true,
35+
showConsoleButton: true,
36+
showLineNumbers: true,
3437
editorHeight: 500,
35-
...props.options
38+
...options,
3639
}}
3740
template="static"
3841
theme="light"
39-
{...props}
42+
{...rest}
4043
>
4144

4245
<slot />

src/components/SyscatComment.astro

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import { Image } from "astro:assets";
3+
import { FrontmatterError } from "@/lib/utils/error";
34
import { SYSCAT } from "@/lib/utils/syscat";
45
56
@@ -8,6 +9,16 @@ type Props = {
89
};
910
1011
const { type } = Astro.props as Props;
12+
13+
const entry = SYSCAT[type ?? "DEFAULT"];
14+
15+
if (entry == null) {
16+
throw new FrontmatterError(
17+
`Unknown SYSCAT entry for type \`${type}\``,
18+
`シスにゃんの種別 (\`${type}\`) が不明です. 使用可能な種別は \`src/lib/utils/syscat.ts\` を参照してください.`,
19+
);
20+
}
21+
1122
---
1223

1324
<div class="syscat-comment">

src/content/docs/textbook/web/for-classes/03--html-structure-hierarchy.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ description: HTMLの入れ子構造と親子関係を学び、divとspanの使
44
slug: textbook/web/for-classes/html-structure-hierarchy
55
sidebar:
66
order: 3
7-
next: false
87
---
98

109
import { Aside, LinkCard } from "@astrojs/starlight/components";

0 commit comments

Comments
 (0)