Skip to content

Commit 5744e5a

Browse files
committed
chore(website): expand playground
1 parent 228cc13 commit 5744e5a

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
'use client'
2+
3+
import {
4+
InputOTP,
5+
InputOTPGroup,
6+
InputOTPSeparator,
7+
InputOTPSlot,
8+
} from '@/components/ui/input-otp'
9+
import React from 'react'
10+
11+
export function ClientComp() {
12+
const [value, setValue] = React.useState('')
13+
14+
return (
15+
<form className="container relative flex-1 flex flex-col justify-center items-center">
16+
<InputOTP
17+
value={value}
18+
onChange={setValue}
19+
maxLength={6}
20+
render={({ slots }) => (
21+
<>
22+
<InputOTPGroup>
23+
{slots.slice(0, 3).map((slot, index) => (
24+
<InputOTPSlot key={index} {...slot} />
25+
))}{' '}
26+
</InputOTPGroup>
27+
<InputOTPSeparator />
28+
<InputOTPGroup>
29+
{slots.slice(3).map((slot, index) => (
30+
<InputOTPSlot key={index} {...slot} />
31+
))}
32+
</InputOTPGroup>
33+
</>
34+
)}
35+
/>
36+
</form>
37+
)
38+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use server'
2+
3+
import { ClientComp } from './client-component'
4+
5+
export default async function StaticPage() {
6+
return (
7+
<>
8+
<ClientComp />
9+
</>
10+
)
11+
}

apps/website/src/app/globals.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,30 @@
4949
}
5050
}
5151

52+
@media (prefers-color-scheme: dark) {
53+
:root {
54+
--background: 240 10% 3.9%;
55+
--foreground: 0 0% 98%;
56+
--card: 240 10% 3.9%;
57+
--card-foreground: 0 0% 98%;
58+
--popover: 240 10% 3.9%;
59+
--popover-foreground: 0 0% 98%;
60+
--primary: 0 0% 98%;
61+
--primary-foreground: 240 5.9% 10%;
62+
--secondary: 240 3.7% 15.9%;
63+
--secondary-foreground: 0 0% 98%;
64+
--muted: 240 3.7% 15.9%;
65+
--muted-foreground: 240 5% 64.9%;
66+
--accent: 240 3.7% 15.9%;
67+
--accent-foreground: 0 0% 98%;
68+
--destructive: 0 62.8% 30.6%;
69+
--destructive-foreground: 0 85.7% 97.3%;
70+
--border: 240 3.7% 15.9%;
71+
--input: 240 3.7% 15.9%;
72+
--ring: 240 4.9% 83.9%;
73+
}
74+
}
75+
5276
@layer base {
5377
* {
5478
@apply border-border;

0 commit comments

Comments
 (0)