formUi 변경 후보자변경

This commit is contained in:
YangJinSoo94
2025-05-30 11:26:46 +09:00
parent 644f6c0015
commit 6bfe08ed8c
@@ -1,8 +1,8 @@
import { Checkbox } from "@common/components/ui";
import React, { useCallback, useState } from "react";
import { FormControl, FormItem, FormLabel, FormMessage } from "../form";
import { Button, Checkbox } from "@common/components/ui";
export const BZNM_TOT_NO = '총사업자등록번호';
export const BZNM_TOT_NO = '종사업자등록번호';
export const CANDIDATE = '공급처 후보지 선택(필수아님)';
interface FormUiProps extends React.HTMLAttributes<HTMLDivElement> {
@@ -23,11 +23,11 @@ const FormUi = React.forwardRef<HTMLDivElement, FormUiProps>(
setIsChecked(checked);
onCheckboxChange?.(checked);
}, [onCheckboxChange]);
console.log(children);
return (
<FormItem ref={ref}>
{label && <FormLabel className="text-xl">{label}</FormLabel>}
{label === BZNM_TOT_NO && (
<>
<div className="float-right">
<div className="flex items-center gap-2">
<Checkbox
@@ -38,6 +38,8 @@ const FormUi = React.forwardRef<HTMLDivElement, FormUiProps>(
<label className="w-20 text-xl text-gray-600" htmlFor="check">해당없음</label>
</div>
</div>
{children}
</>
)}
{label === CANDIDATE && (
<FormControl>
@@ -61,4 +63,4 @@ const FormUi = React.forwardRef<HTMLDivElement, FormUiProps>(
);
FormUi.displayName = 'FormUi';
export { FormUi };
export { FormUi };