Skip to content

Commit

Permalink
feat(docs): implement playground
Browse files Browse the repository at this point in the history
  • Loading branch information
NWYLZW committed Nov 13, 2024
1 parent 5e4ab47 commit 35e9eb9
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 23 deletions.
13 changes: 11 additions & 2 deletions docs/.vitepress/components/Playground.client.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
</template>
<style scoped lang="scss">
.playground {
--radius: 8px;
--shadow: 0 8px 16px rgba(0, 0, 0, .1);
display: flex;
Expand All @@ -52,13 +53,21 @@
&:hover {
filter: drop-shadow(var(--shadow));
}
&.xl {
.top-bar, .bottom-bar {
> .left, > .right {
.material-symbols-rounded {
padding: 12px;
font-size: 24px;
}
}
}
}
}
.dark .playground {
--shadow: 0 8px 16px rgba(0, 0, 0, .4);
}
.top-bar, .bottom-bar {
--radius: 8px;
z-index: 1;
display: flex;
align-items: center;
Expand Down
1 change: 0 additions & 1 deletion docs/en/playground.md

This file was deleted.

19 changes: 0 additions & 19 deletions docs/playground.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/zh-Hans/playground.md

This file was deleted.

22 changes: 22 additions & 0 deletions docs/zh-Hans/playground.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
layout: page
title: Playground
pageClass: playground-page
---

<script setup>
import Playground from '#components/Playground.vue'
</script>

<Playground
style="--radius: 0px; margin-top: 0; height: calc(100vh - 64px);"
class="xl"
>
```ts
import { t } from '@typp/core'

export default t({ name: String, age: Number })
```

</Playground>

0 comments on commit 35e9eb9

Please sign in to comment.