issue # 회원가입 화면 구현 중
This commit is contained in:
@@ -1,58 +1,28 @@
|
||||
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
|
||||
import { useState } from 'react';
|
||||
import { format } from 'date-fns';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { Calendar } from '@/components/ui/calendar';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle
|
||||
} from '@/components/ui/card';
|
||||
import { Form, FormField } from '@/components/ui/form';
|
||||
|
||||
export default function SignUpPage() {
|
||||
const [open, setOpen] = useState<boolean>(false);
|
||||
const [date, setDate] = useState<Date>(new Date());
|
||||
|
||||
return (
|
||||
<div className="w-full h-full flex flex-row justify-center items-center">
|
||||
<div className="flex flex-col gap-4 justify-center items-center">
|
||||
<Label>Date Picker</Label>
|
||||
<Popover
|
||||
open={open}
|
||||
onOpenChange={setOpen}
|
||||
>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
variant="outline"
|
||||
id="date"
|
||||
className="w-fit justify-between font-normal"
|
||||
>
|
||||
{date ? format(date, "yyyy/MM/dd") : "Select Date"}
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent>
|
||||
<Calendar
|
||||
mode="single"
|
||||
timeZone="Asia/Seoul"
|
||||
formatters={{
|
||||
formatCaption: (month) =>
|
||||
format(month, "yyyy년 MM월")
|
||||
}}
|
||||
onSelect={(date) => {
|
||||
if (date) {
|
||||
setDate(date);
|
||||
setOpen(false);
|
||||
}
|
||||
}}
|
||||
selected={date}
|
||||
defaultMonth={date}
|
||||
captionLayout="dropdown"
|
||||
/>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
<Input
|
||||
type="time"
|
||||
id="time"
|
||||
defaultValue={format(date, "HH:mm")}
|
||||
/>
|
||||
</div>
|
||||
<div className="w-full h-full flex flex-col justify-center items-center">
|
||||
<Card className="w-xl h-4/6">
|
||||
<CardHeader className="ml-2.5 select-none">
|
||||
<CardTitle className="text-3xl">로그인</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<Label>a</Label>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user