diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts
index b57d4a0..f0279f7 100644
--- a/docs/.vitepress/config.ts
+++ b/docs/.vitepress/config.ts
@@ -1,6 +1,14 @@
import { defineConfig } from 'vitepress'
import UnoCSS from 'unocss/vite'
-import { presetUno, presetWind, presetTypography } from 'unocss'
+import { colors } from '@fmhy/colors'
+import { presetUno, presetWind } from 'unocss'
+
+const safelist = Object.entries(colors).flatMap(([group, shades]) =>
+ Object.keys(shades).flatMap((shade) => [
+ `text-${group}-${shade}`,
+ `bg-${group}-${shade}`
+ ])
+)
export default defineConfig({
title: 'Design System',
@@ -8,7 +16,12 @@ export default defineConfig({
cleanUrls: true,
vite: {
plugins: [
- UnoCSS({ presets: [presetUno(), presetWind(), presetTypography()] })
+ // @ts-expect-error
+ UnoCSS({
+ theme: { colors: colors },
+ safelist,
+ presets: [presetUno(), presetWind()]
+ })
]
},
themeConfig: {
diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts
index 2146cbf..04560ee 100644
--- a/docs/.vitepress/theme/index.ts
+++ b/docs/.vitepress/theme/index.ts
@@ -1,7 +1,7 @@
-// https://vitepress.dev/guide/custom-theme
import { h } from 'vue'
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
+import Components from '@fmhy/components'
import './style.css'
import 'uno.css'
@@ -13,6 +13,6 @@ export default {
})
},
enhanceApp({ app, router, siteData }) {
- // ...
+ app.use(Components)
}
} satisfies Theme
diff --git a/docs/components.md b/docs/components.md
new file mode 100644
index 0000000..fc36ab8
--- /dev/null
+++ b/docs/components.md
@@ -0,0 +1,6 @@
+# Components
+
+## `GradientCard`
+
+