-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* FormItem 컴포넌트 추가 및 FormItem 기반으로 MoonForm 변경 * Form을 key 기반으로 변경 * preview 페이지에서 title, description이 없을때 기본값이 들어갈 수 있는 틀 마련 * 초기 데이터에 type 추가 * LinkPreview에서 title, description에 type 에러나던 것 수정
- Loading branch information
Showing
4 changed files
with
118 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React, { HTMLInputTypeAttribute } from 'react'; | ||
|
||
type Props = { | ||
label: string; | ||
children: React.ReactNode; | ||
}; | ||
|
||
function FormItem({ label, children }: Props) { | ||
return ( | ||
<div className="form-control w-full max-w-xs"> | ||
<label className="label"> | ||
<span className="label-text">{label}</span> | ||
</label> | ||
{children} | ||
</div> | ||
); | ||
} | ||
|
||
export default FormItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
type FormValues = { | ||
liveMode: boolean; | ||
date: string; | ||
size: string; | ||
theme: string; | ||
rotate: string; | ||
liveMode?: boolean; | ||
size?: string; | ||
rotate?: string; | ||
title?: string; | ||
description?: string; | ||
}; | ||
|
||
type FormKeys = keyof FormValues; |
ede2c86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
moon-svg – ./
moon-svg-git-main-hmu332233.vercel.app
moon-svg-hmu332233.vercel.app
moon-phase.vercel.app
moon-svg.minung.dev