Skip to content

Commit f1545f5

Browse files
committed
chore(docs): change basic docs path
1 parent 743d66e commit f1545f5

File tree

7 files changed

+20
-26
lines changed

7 files changed

+20
-26
lines changed

docs/.vitepress/config.mts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default defineConfig({
1515
'edit-on-github': 'Edit on GitHub',
1616
'copy-code': 'Copy code',
1717
'copy-success': 'Copy success',
18-
'copy-error': 'Copy error'
18+
'copy-error': 'Copy error',
1919
},
2020
zh: {
2121
'view-source': '查看源代码',
@@ -24,48 +24,48 @@ export default defineConfig({
2424
'edit-on-github': '在 Github 中编辑',
2525
'copy-code': '复制代码',
2626
'copy-success': '复制成功',
27-
'copy-error': '复制失败'
28-
}
27+
'copy-error': '复制失败',
28+
},
2929
},
3030

3131
// https://vitepress.dev/reference/default-theme-config
3232
nav: [
3333
{ text: 'Home', link: '/' },
34-
{ text: 'Guide', link: '/guide/quick-start' }
34+
{ text: 'Guide', link: '/guide/basic/quick-start' },
3535
],
3636

3737
sidebar: [
3838
{
3939
text: 'Basic',
4040
items: [
41-
{ text: 'Quick Start', link: '/guide/quick-start' },
42-
{ text: 'Passed Props', link: '/guide/passed-props' },
43-
{ text: 'Extending Styles', link: '/guide/extending-styles' },
44-
{ text: 'Styling Any Component', link: '/guide/styling-any-component' },
45-
{ text: 'Animations', link: '/guide/animations' }
46-
]
41+
{ text: 'Quick Start', link: '/guide/basic/quick-start' },
42+
{ text: 'Passed Props', link: '/guide/basic/passed-props' },
43+
{ text: 'Extending Styles', link: '/guide/basic/extending-styles' },
44+
{ text: 'Styling Any Component', link: '/guide/basic/styling-any-component' },
45+
{ text: 'Animations', link: '/guide/basic/animations' },
46+
],
4747
},
4848
{
4949
text: 'Advances',
50-
items: [{ text: 'Runtime API Examples', link: '/api-examples' }]
51-
}
50+
items: [{ text: 'Theming', link: '/guide/advances/theming' }],
51+
},
5252
],
5353

54-
socialLinks: [{ icon: 'github', link: 'https://github.com/vue-styled-components/vue3-styled-components' }]
54+
socialLinks: [{ icon: 'github', link: 'https://github.com/vue-styled-components/vue3-styled-components' }],
5555
},
5656
markdown: {
5757
config: (md) => {
5858
md.use(demoblockPlugin)
59-
}
59+
},
6060
},
6161
vite: {
6262
resolve: {
6363
alias: {
64-
'@': new URL('../../package', import.meta.url).pathname
64+
'@': new URL('../../package', import.meta.url).pathname,
6565
},
66-
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue', '.less']
66+
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue', '.less'],
6767
},
68-
plugins: [demoblockVitePlugin()]
68+
plugins: [demoblockVitePlugin()],
6969
},
70-
vue: {}
70+
vue: {},
7171
})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

package/providers/theme.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@ import { defineComponent, h, PropType, provide, ref, useSlots, watch } from 'vue
22

33
export const ThemeProvider = defineComponent(
44
(props) => {
5-
const theme = ref(props.theme)
6-
7-
watch(props.theme, (newTheme) => {
8-
theme.value = newTheme
9-
})
10-
11-
provide('$theme', theme.value)
5+
provide('$theme', props.theme)
126

137
return () => {
148
const slot = useSlots()
@@ -21,7 +15,7 @@ export const ThemeProvider = defineComponent(
2115
theme: {
2216
type: Object as PropType<Record<string, string | number>>,
2317
required: true,
24-
default: {}
18+
default: () => {}
2519
}
2620
}
2721
}

0 commit comments

Comments
 (0)