Skip to content

Commit

Permalink
chore(website): expand playground
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermerodz committed Mar 10, 2024
1 parent 228cc13 commit 5744e5a
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
'use client'

import {
InputOTP,
InputOTPGroup,
InputOTPSeparator,
InputOTPSlot,
} from '@/components/ui/input-otp'
import React from 'react'

export function ClientComp() {
const [value, setValue] = React.useState('')

return (
<form className="container relative flex-1 flex flex-col justify-center items-center">
<InputOTP
value={value}
onChange={setValue}
maxLength={6}
render={({ slots }) => (
<>
<InputOTPGroup>
{slots.slice(0, 3).map((slot, index) => (
<InputOTPSlot key={index} {...slot} />
))}{' '}
</InputOTPGroup>
<InputOTPSeparator />
<InputOTPGroup>
{slots.slice(3).map((slot, index) => (
<InputOTPSlot key={index} {...slot} />
))}
</InputOTPGroup>
</>
)}
/>
</form>
)
}
11 changes: 11 additions & 0 deletions apps/website/src/app/(local-pages)/shadcn/static/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use server'

import { ClientComp } from './client-component'

export default async function StaticPage() {
return (
<>
<ClientComp />
</>
)
}
24 changes: 24 additions & 0 deletions apps/website/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,30 @@
}
}

@media (prefers-color-scheme: dark) {
:root {
--background: 240 10% 3.9%;
--foreground: 0 0% 98%;
--card: 240 10% 3.9%;
--card-foreground: 0 0% 98%;
--popover: 240 10% 3.9%;
--popover-foreground: 0 0% 98%;
--primary: 0 0% 98%;
--primary-foreground: 240 5.9% 10%;
--secondary: 240 3.7% 15.9%;
--secondary-foreground: 0 0% 98%;
--muted: 240 3.7% 15.9%;
--muted-foreground: 240 5% 64.9%;
--accent: 240 3.7% 15.9%;
--accent-foreground: 0 0% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 85.7% 97.3%;
--border: 240 3.7% 15.9%;
--input: 240 3.7% 15.9%;
--ring: 240 4.9% 83.9%;
}
}

@layer base {
* {
@apply border-border;
Expand Down

0 comments on commit 5744e5a

Please sign in to comment.