Skip to content

Commit 07966e7

Browse files
committed
U
1 parent 7ac3a83 commit 07966e7

11 files changed

Lines changed: 183 additions & 4 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Upload artifact
5454
uses: actions/upload-pages-artifact@v3
5555
with:
56-
path: docs-dist
56+
path: doc_build
5757

5858
# Deployment job
5959
deploy:

docs/components/button/index.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Button
2+
3+
当和用户有交互场景引导的时候,可以使用 `Button` 组件进行引导。
4+
5+
## Playground
6+
7+
<code src="./playground.tsx" />
8+
9+
## API
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { Button } from '@shilong/react'
2+
3+
function App() {
4+
return <Button onClick={() => alert('Ooops')}>Click Me!</Button>
5+
}
6+
7+
export default App

docs/components/toast.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Toast

docs/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Getting Started
1+
# Quick Start
22

33
基于 `Tailwindcss` 的一个 `React` 组件库. 参考 `shadcn-ui` 实现. 目前只提供 `ES` 模块
44

docs/public/favicon.ico

256 KB
Binary file not shown.

docs/public/logo.png

8.88 KB
Loading

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
5555
},
5656
"devDependencies": {
57+
"@rspress/plugin-playground": "^1.45.1",
5758
"@rspress/plugin-preview": "^1.45.1",
5859
"@tailwindcss/vite": "^4.1.11",
5960
"@testing-library/jest-dom": "^6.6.3",

pnpm-lock.yaml

Lines changed: 118 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rspress.config.ts

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,63 @@
11
import { defineConfig } from 'rspress/config'
22
import { pluginPreview } from '@rspress/plugin-preview'
3+
import { pluginPlayground } from '@rspress/plugin-playground'
34

45
export default defineConfig({
56
// 文档根目录
67
root: 'docs',
8+
icon: '/favicon.ico',
79
themeConfig: {
810
nav: [
911
{
10-
text: 'Home',
12+
text: 'Quick Start',
1113
link: '/',
14+
activeMatch: '^/index\.html$',
15+
},
16+
{
17+
text: 'Components',
18+
link: '/components/button',
19+
activeMatch: '/components',
1220
},
1321
],
22+
sidebar: {
23+
'/components': [
24+
{
25+
text: 'Button',
26+
link: '/components/button',
27+
},
28+
{
29+
text: 'Toast',
30+
link: '/components/toast',
31+
},
32+
{
33+
text: 'Popover',
34+
link: '/components/popover',
35+
},
36+
{
37+
text: 'Input',
38+
link: '/components/input',
39+
},
40+
{
41+
text: 'Tooltip',
42+
link: '/components/tooltip',
43+
},
44+
{
45+
text: 'Activity',
46+
link: '/components/activity',
47+
},
48+
{
49+
text: 'Skeleton',
50+
link: '/components/skeleton',
51+
},
52+
],
53+
},
1454
},
1555
plugins: [
1656
pluginPreview({
1757
defaultRenderMode: 'pure',
1858
}),
59+
pluginPlayground({
60+
defaultRenderMode: 'pure',
61+
}),
1962
],
2063
})

0 commit comments

Comments
 (0)