Skip to content

Commit ec1bef1

Browse files
committed
Add back tailwind config
1 parent e032ab2 commit ec1bef1

2 files changed

Lines changed: 119 additions & 1 deletion

File tree

src/pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/
1010
import { Dialog, DialogTrigger, DialogTitle, DialogDescription, DialogHeader, DialogFooter, DialogContent } from "@/components/ui/dialog";
1111
import { Input } from "@/components/ui/input";
1212
import { Label } from "@/components/ui/label";
13-
import { Select, SelectItem, SelectTrigger, SelectValue, SelectContent, SelectGroup } from "@/components/ui/select";
13+
import { Select, SelectItem, SelectTrigger, SelectValue, SelectContent } from "@/components/ui/select";
1414

1515
const sample_code = `
1616
from pybricks.pupdevices import Motor

tailwind.config.ts

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
import type { Config } from "tailwindcss"
2+
3+
const config = {
4+
darkMode: ["class"],
5+
content: [
6+
'./pages/**/*.{ts,tsx}',
7+
'./components/**/*.{ts,tsx}',
8+
'./app/**/*.{ts,tsx}',
9+
'./src/**/*.{ts,tsx}',
10+
],
11+
prefix: "",
12+
theme: {
13+
container: {
14+
center: true,
15+
padding: "2rem",
16+
screens: {
17+
"2xl": "1400px",
18+
},
19+
},
20+
extend: {
21+
colors: {
22+
border: "hsl(var(--border))",
23+
input: "hsl(var(--input))",
24+
ring: "hsl(var(--ring))",
25+
background: "hsl(var(--background))",
26+
foreground: "hsl(var(--foreground))",
27+
primary: {
28+
DEFAULT: "hsl(var(--primary))",
29+
foreground: "hsl(var(--primary-foreground))",
30+
},
31+
secondary: {
32+
DEFAULT: "hsl(var(--secondary))",
33+
foreground: "hsl(var(--secondary-foreground))",
34+
},
35+
destructive: {
36+
DEFAULT: "hsl(var(--destructive))",
37+
foreground: "hsl(var(--destructive-foreground))",
38+
},
39+
muted: {
40+
DEFAULT: "hsl(var(--muted))",
41+
foreground: "hsl(var(--muted-foreground))",
42+
},
43+
accent: {
44+
DEFAULT: "hsl(var(--accent))",
45+
foreground: "hsl(var(--accent-foreground))",
46+
},
47+
popover: {
48+
DEFAULT: "hsl(var(--popover))",
49+
foreground: "hsl(var(--popover-foreground))",
50+
},
51+
card: {
52+
DEFAULT: "hsl(var(--card))",
53+
foreground: "hsl(var(--card-foreground))",
54+
},
55+
ocean: "#1567CB"
56+
},
57+
borderRadius: {
58+
lg: "var(--radius)",
59+
md: "calc(var(--radius) - 2px)",
60+
sm: "calc(var(--radius) - 4px)",
61+
},
62+
keyframes: {
63+
fadeIn: {
64+
'0%': { opacity: '0', transform: 'translateY(15px)' },
65+
'100%': { opacity: '1', transform: 'translateY(0)' },
66+
},
67+
fadeInDown: {
68+
'0%': { opacity: '0', transform: 'translateY(-15px)' },
69+
'100%': { opacity: '1', transform: 'translateY(0)' },
70+
},
71+
fadeInUp: {
72+
'0%': { opacity: '0', transform: 'translateY(15px)' },
73+
'100%': { opacity: '1', transform: 'translateY(0)' },
74+
},
75+
},
76+
animation: {
77+
'fade-in': 'fadeIn 0.8s ease-out forwards',
78+
'fade-in-down': 'fadeInDown 0.8s ease-out forwards',
79+
'fade-in-up': 'fadeInUp 0.8s ease-out forwards',
80+
},
81+
animationDelay: {
82+
'100': '0.1s',
83+
'200': '0.2s',
84+
'300': '0.3s',
85+
'400': '0.4s',
86+
'500': '0.5s',
87+
'600': '0.6s',
88+
'700': '0.7s',
89+
'800': '0.8s',
90+
'900': '0.9s',
91+
'1000': '1s',
92+
'1100': '1.1s',
93+
'1200': '1.2s',
94+
'1300': '1.3s',
95+
'1400': '1.4s',
96+
'1500': '1.5s',
97+
'1600': '1.6s',
98+
'1700': '1.7s',
99+
'1800': '1.8s',
100+
'1900': '1.9s',
101+
'2000': '2s',
102+
},
103+
},
104+
},
105+
plugins: [
106+
require("tailwindcss-animate"),
107+
function ({ addUtilities, theme }: { addUtilities: (utilities: Record<string, any>, variants?: string[]) => void; theme: (path: string) => any }) {
108+
const delays = theme('animationDelay');
109+
const delayUtilities = Object.entries(delays).reduce((acc, [key, value]) => {
110+
acc[`.delay-${key}`] = { 'animation-delay': value };
111+
return acc;
112+
}, {} as Record<string, any>);
113+
addUtilities(delayUtilities, ['responsive', 'hover']);
114+
},
115+
],
116+
} satisfies Config
117+
118+
export default config

0 commit comments

Comments
 (0)