diff --git a/apps/www/.vitepress/theme/components/ComponentLoader.vue b/apps/www/.vitepress/theme/components/ComponentLoader.vue
new file mode 100644
index 00000000..fa3d533e
--- /dev/null
+++ b/apps/www/.vitepress/theme/components/ComponentLoader.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
diff --git a/apps/www/.vitepress/theme/components/ComponentPreview.vue b/apps/www/.vitepress/theme/components/ComponentPreview.vue
index a578e322..6b657467 100644
--- a/apps/www/.vitepress/theme/components/ComponentPreview.vue
+++ b/apps/www/.vitepress/theme/components/ComponentPreview.vue
@@ -1,7 +1,8 @@
@@ -40,6 +37,9 @@ const Component = defineAsyncComponent({
+
+
+
-
+
diff --git a/apps/www/.vitepress/theme/components/StyleSwitcher.vue b/apps/www/.vitepress/theme/components/StyleSwitcher.vue
new file mode 100644
index 00000000..b11f6e13
--- /dev/null
+++ b/apps/www/.vitepress/theme/components/StyleSwitcher.vue
@@ -0,0 +1,33 @@
+
+
+
+
+
diff --git a/apps/www/.vitepress/theme/composables/style.ts b/apps/www/.vitepress/theme/composables/style.ts
new file mode 100644
index 00000000..3a0ec221
--- /dev/null
+++ b/apps/www/.vitepress/theme/composables/style.ts
@@ -0,0 +1,4 @@
+import { useStorage } from '@vueuse/core'
+import { styles } from '../../../src/lib/registry/styles'
+
+export const useStyle = () => useStorage('selected-style', styles[0].name)
diff --git a/apps/www/src/lib/registry/styles.ts b/apps/www/src/lib/registry/styles.ts
index 1d6cf4fb..4387500a 100644
--- a/apps/www/src/lib/registry/styles.ts
+++ b/apps/www/src/lib/registry/styles.ts
@@ -3,10 +3,10 @@ export const styles = [
name: 'default',
label: 'Default',
},
- // {
- // name: 'new-york',
- // label: 'New York',
- // },
+ {
+ name: 'new-york',
+ label: 'New York',
+ },
] as const
export type Style = (typeof styles)[number]
diff --git a/apps/www/src/stores/config.ts b/apps/www/src/stores/config.ts
index 08fa35ad..e1a5fd26 100644
--- a/apps/www/src/stores/config.ts
+++ b/apps/www/src/stores/config.ts
@@ -1,10 +1,12 @@
import { computed } from 'vue'
import { useSessionStorage } from '@vueuse/core'
import type { Theme } from './../lib/registry/themes'
+import { styles } from '@/lib/registry/styles'
interface Config {
theme: Theme['name']
radius: number
+ style: string
}
export const RADII = [0, 0.25, 0.5, 0.75, 1]
@@ -13,13 +15,14 @@ export function useConfigStore() {
const config = useSessionStorage('config', {
theme: 'zinc',
radius: 0.5,
+ style: styles[0].name,
})
const themeClass = computed(() => `theme-${config.value.theme}`)
const theme = computed(() => config.value.theme)
-
const radius = computed(() => config.value.radius)
+ const style = computed(() => config.value.style)
function setTheme(themeName: Theme['name']) {
config.value.theme = themeName
@@ -29,5 +32,5 @@ export function useConfigStore() {
config.value.radius = newRadius
}
- return { config, theme, setTheme, radius, setRadius, themeClass }
+ return { config, theme, setTheme, radius, setRadius, themeClass, style }
}