diff --git a/.gitignore b/.gitignore index f20530830..df5cd377e 100644 --- a/.gitignore +++ b/.gitignore @@ -94,4 +94,4 @@ deploy/* fb_keepalive # pnpm store -.pnpm-store \ No newline at end of file +.pnpm-store diff --git a/unraid-ui/README.md b/unraid-ui/README.md index 11e8f3db0..459382fb3 100644 --- a/unraid-ui/README.md +++ b/unraid-ui/README.md @@ -24,31 +24,44 @@ npm install vue@^3.3.0 tailwindcss@^3.0.0 Import the component library styles in your main entry file: ```typescript -import "@unraid/ui/style.css"; +import '@unraid/ui/style.css'; ``` ### 2. Configure TailwindCSS -Add the following to your `tailwind.config.js`: +Create a `tailwind.config.ts` file with the following configuration: -```javascript -module.exports = { +```typescript +import tailwindConfig from '@unraid/ui/tailwind.config.ts'; +import type { Config } from 'tailwindcss'; + +export default { + presets: [tailwindConfig], content: [ // ... your content paths - "./node_modules/@unraid/ui/**/*.{js,vue,ts}", + './components/**/*.{js,vue,ts}', + './layouts/**/*.vue', + './pages/**/*.vue', ], theme: { - extend: {}, + extend: { + // your theme extensions + }, }, - plugins: [require("tailwindcss-animate"), require("@tailwindcss/typography")], -}; +} satisfies Partial; ``` +This configuration: + +- Uses the Unraid UI library's Tailwind config as a preset +- Properly types your configuration with TypeScript +- Allows you to extend the base theme while maintaining all Unraid UI defaults + ## Usage ```vue