Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add kitchen sink page for components #109

Merged
merged 1 commit into from
Aug 2, 2023
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ repos:
- id: editorconfig-checker
alias: ec
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode
rev: v3.0.0
hooks:
- id: prettier
1 change: 1 addition & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default defineConfig({
tabsAutoImport,
tabNameAutoImport,
tabContentAutoImport,
"@components/Aside.astro",
],
}),
// Enable Preact to support Preact JSX components.
Expand Down
91 changes: 91 additions & 0 deletions src/content/docs/en/kitchen-sink/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
title: "Kitchen sink"
description: "A test page for custom components"
slug: "en/kitchen-sink/index"
category-title: "Kitchen sink"
---

This page includes documentation for this site's custom authoring components and examples of their use.

## Callouts

Callouts are `<aside>` components which display additional information in visually distinct ways.

### Props

| Prop | Data type | Values | Required |
| ------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
| `type` | String | <ul><li><code>note</code></li><li><code>tip</code></li><li><code>caution</code></li><li><code>danger</code></li><li><code>seealso</code></li></ul> | No. Defaults to `note` |
| `title` | String | The title of the callout | No. Defaults to `type` |

### Examples

#### Note callout

```mdx
<Aside type="note" title="A note callout">
This is a *note* callout. It **renders**
[Markdown](https://www.markdownguide.org/).
</Aside>
```

<Aside type="note" title="A note callout">
This is a *note* callout. It **renders**
[Markdown](https://www.markdownguide.org/).
</Aside>

#### Tip callout

```mdx
<Aside type="tip" title="A tip callout">
This is a *tip* callout. It **renders**
[Markdown](https://www.markdownguide.org/).
</Aside>
```

<Aside type="tip" title="A tip callout">
This is a *tip* callout. It **renders**
[Markdown](https://www.markdownguide.org/).
</Aside>

#### Caution callout

```mdx
<Aside type="caution" title="A caution callout">
This is a *caution* callout. It **renders**
[Markdown](https://www.markdownguide.org/).
</Aside>
```

<Aside type="caution" title="A caution callout">
This is a *caution* callout. It **renders**
[Markdown](https://www.markdownguide.org/).
</Aside>

#### Danger callout

```mdx
<Aside type="danger" title="A danger callout">
This is a *danger* callout. It **renders**
[Markdown](https://www.markdownguide.org/).
</Aside>
```

<Aside type="danger" title="A danger callout">
This is a *danger* callout. It **renders**
[Markdown](https://www.markdownguide.org/).
</Aside>

#### Seealso callout

```mdx
<Aside type="seealso" title="A seealso callout">
This is a *seealso* callout. It **renders**
[Markdown](https://www.markdownguide.org/).
</Aside>
```

<Aside type="seealso" title="A seealso callout">
This is a *seealso* callout. It **renders**
[Markdown](https://www.markdownguide.org/).
</Aside>
Loading