From 43768cb49d1007fae9c54af85dbfc11039540a2f Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Sun, 9 Jun 2024 14:03:12 +0200 Subject: [PATCH] Added shadcn switch --- assets/main.css | 6 ++++-- components.json | 1 + components/ui/switch/Switch.vue | 37 +++++++++++++++++++++++++++++++++ components/ui/switch/index.ts | 1 + 4 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 components/ui/switch/Switch.vue create mode 100644 components/ui/switch/index.ts diff --git a/assets/main.css b/assets/main.css index ad39aa5..68dd98d 100644 --- a/assets/main.css +++ b/assets/main.css @@ -2,7 +2,8 @@ @tailwind components; @tailwind utilities; -:root { +@layer base { + :root { --background: 0 0% 100%; --foreground: 222.2 84% 4.9%; @@ -35,7 +36,7 @@ --radius: 0.5rem; } - :root.dark { + .dark { --background: 222.2 84% 4.9%; --foreground: 210 40% 98%; @@ -64,6 +65,7 @@ --destructive-foreground: 210 40% 98%; --ring: 212.7 26.8% 83.9%; + } } @layer base { diff --git a/components.json b/components.json index be94b1d..3dc3dc9 100644 --- a/components.json +++ b/components.json @@ -2,6 +2,7 @@ "$schema": "https://shadcn-vue.com/schema.json", "style": "default", "typescript": true, + "tsConfigPath": ".nuxt/tsconfig.json", "tailwind": { "config": "tailwind.config.js", "css": "assets/main.css", diff --git a/components/ui/switch/Switch.vue b/components/ui/switch/Switch.vue new file mode 100644 index 0000000..f2ee993 --- /dev/null +++ b/components/ui/switch/Switch.vue @@ -0,0 +1,37 @@ + + + diff --git a/components/ui/switch/index.ts b/components/ui/switch/index.ts new file mode 100644 index 0000000..87b4b17 --- /dev/null +++ b/components/ui/switch/index.ts @@ -0,0 +1 @@ +export { default as Switch } from './Switch.vue'