File tree Expand file tree Collapse file tree 3 files changed +73
-0
lines changed
(local-pages)/shadcn/static Expand file tree Collapse file tree 3 files changed +73
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change 49
49
}
50
50
}
51
51
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
+
52
76
@layer base {
53
77
* {
54
78
@apply border-border;
You can’t perform that action at this time.
0 commit comments