Skip to content

Commit c5d8684

Browse files
committed
add shadcn/ui and prettier
1 parent 74aae4c commit c5d8684

8 files changed

+354
-149
lines changed

.prettierrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": ["prettier-plugin-tailwindcss"]
3+
}

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cSpell.words": ["clsx", "tailwindcss"]
3+
}

app/globals.css

+76
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,79 @@
11
@tailwind base;
22
@tailwind components;
33
@tailwind utilities;
4+
5+
@layer base {
6+
:root {
7+
--background: 0 0% 100%;
8+
--foreground: 240 10% 3.9%;
9+
10+
--card: 0 0% 100%;
11+
--card-foreground: 240 10% 3.9%;
12+
13+
--popover: 0 0% 100%;
14+
--popover-foreground: 240 10% 3.9%;
15+
16+
--primary: 240 5.9% 10%;
17+
--primary-foreground: 0 0% 98%;
18+
19+
--secondary: 240 4.8% 95.9%;
20+
--secondary-foreground: 240 5.9% 10%;
21+
22+
--muted: 240 4.8% 95.9%;
23+
--muted-foreground: 240 3.8% 46.1%;
24+
25+
--accent: 240 4.8% 95.9%;
26+
--accent-foreground: 240 5.9% 10%;
27+
28+
--destructive: 0 84.2% 60.2%;
29+
--destructive-foreground: 0 0% 98%;
30+
31+
--border: 240 5.9% 90%;
32+
--input: 240 5.9% 90%;
33+
--ring: 240 10% 3.9%;
34+
35+
--radius: 0.5rem;
36+
}
37+
38+
@media (prefers-color-scheme: dark) {
39+
:root {
40+
--background: 240 10% 3.9%;
41+
--foreground: 0 0% 98%;
42+
43+
--card: 240 10% 3.9%;
44+
--card-foreground: 0 0% 98%;
45+
46+
--popover: 240 10% 3.9%;
47+
--popover-foreground: 0 0% 98%;
48+
49+
--primary: 0 0% 98%;
50+
--primary-foreground: 240 5.9% 10%;
51+
52+
--secondary: 240 3.7% 15.9%;
53+
--secondary-foreground: 0 0% 98%;
54+
55+
--muted: 240 3.7% 15.9%;
56+
--muted-foreground: 240 5% 64.9%;
57+
58+
--accent: 240 3.7% 15.9%;
59+
--accent-foreground: 0 0% 98%;
60+
61+
--destructive: 0 62.8% 30.6%;
62+
--destructive-foreground: 0 0% 98%;
63+
64+
--border: 240 3.7% 15.9%;
65+
--input: 240 3.7% 15.9%;
66+
--ring: 240 4.9% 83.9%;
67+
}
68+
}
69+
}
70+
71+
@layer base {
72+
* {
73+
@apply border-border;
74+
}
75+
76+
body {
77+
@apply bg-background text-foreground;
78+
}
79+
}

components.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.ts",
8+
"css": "app/globals.css",
9+
"baseColor": "zinc",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "~/components",
15+
"utils": "~/lib/utils"
16+
}
17+
}

lib/utils.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { type ClassValue, clsx } from "clsx";
2+
import { twMerge } from "tailwind-merge";
3+
4+
export function cn(...inputs: ClassValue[]) {
5+
return twMerge(clsx(inputs));
6+
}

0 commit comments

Comments
 (0)