Skip to content

Commit b064830

Browse files
committed
fix: FormField에서 id props 제거
1 parent 91b12eb commit b064830

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

apps/host/src/shared/ui/form/form-field/form-field.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,14 @@ import type { ReactNode } from 'react';
33
import * as styles from './form-field.css';
44

55
interface 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
);

apps/host/src/widgets/event-form/event-form.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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'

0 commit comments

Comments
 (0)