File tree Expand file tree Collapse file tree 2 files changed +6
-14
lines changed
shared/ui/form/form-field Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -3,22 +3,14 @@ import type { ReactNode } from 'react';
33import * as styles from './form-field.css' ;
44
55interface FormFieldProps {
6- id ?: string ;
76 label ?: string ;
87 children : ReactNode ;
98}
109
11- const FormField = ( { id , label, children } : FormFieldProps ) => {
10+ const FormField = ( { label, children } : FormFieldProps ) => {
1211 return (
1312 < div className = { styles . field } >
14- { label &&
15- ( id ? (
16- < label htmlFor = { id } className = { styles . fieldLabel } >
17- { label }
18- </ label >
19- ) : (
20- < p className = { styles . fieldLabel } > { label } </ p >
21- ) ) }
13+ { label && < p className = { styles . fieldLabel } > { label } </ p > }
2214 { children }
2315 </ div >
2416 ) ;
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ const EventForm = ({
180180 </ div >
181181 </ FormField >
182182
183- < FormField id = 'eventTitle' label = '공연명' >
183+ < FormField label = '공연명' >
184184 < Textfield
185185 name = 'eventTitle'
186186 variant = 'default'
@@ -192,7 +192,7 @@ const EventForm = ({
192192 />
193193 </ FormField >
194194
195- < FormField id = 'scheduleDate' label = '공연 일시' >
195+ < FormField label = '공연 일시' >
196196 < div className = { styles . grid } >
197197 < Textfield
198198 id = 'scheduleDate'
@@ -241,7 +241,7 @@ const EventForm = ({
241241 />
242242 </ FormField >
243243
244- < FormField id = 'eventLocation' label = '공연 장소' >
244+ < FormField label = '공연 장소' >
245245 < Textfield
246246 id = 'eventLocation'
247247 name = 'eventLocation'
@@ -265,7 +265,7 @@ const EventForm = ({
265265 관객이 현장 혼잡도를 직접 입력할 수 있어요.
266266 </ p >
267267
268- < FormField id = 'boothTitle' >
268+ < FormField >
269269 < Textfield
270270 id = 'boothTitle'
271271 name = 'boothTitle'
You can’t perform that action at this time.
0 commit comments