sn: 침입수, RDII 제목란 조금 넓게 외
This commit is contained in:
@@ -244,7 +244,7 @@ const InfilChart = ({
|
||||
|
||||
const renderResultPanel = () => (
|
||||
<section className="card card-border !m-0 min-w-0 overflow-hidden !p-[1.2rem]">
|
||||
<StandardFormSection title="침입수 분석결과" columns={2}>
|
||||
<StandardFormSection title="침입수 분석결과" columns={2} wideLabels>
|
||||
<StandardFormField label="상수사용량 적용연월" columns={2}>
|
||||
<div className="flex min-h-[3.2rem] items-center justify-end text-[1.35rem] font-semibold tabular-nums text-foreground">
|
||||
{selectedAplcnYm
|
||||
|
||||
@@ -218,7 +218,7 @@ const RdiiChart = ({
|
||||
|
||||
const renderResultPanel = () => (
|
||||
<section className="card card-border !m-0 min-w-0 overflow-hidden !p-[1.2rem]">
|
||||
<StandardFormSection title="RDII 분석결과" columns={2}>
|
||||
<StandardFormSection title="RDII 분석결과" columns={2} wideLabels>
|
||||
<StandardFormField label="상수사용 적용연월" columns={2}>
|
||||
<div className="flex min-h-[3.2rem] items-center justify-end text-[1.35rem] font-semibold tabular-nums text-foreground">
|
||||
{selectedAplcnYm
|
||||
|
||||
@@ -485,6 +485,7 @@ const IrSetting = () => {
|
||||
key="irsetting-layout-key"
|
||||
title="분석 조건 및 자료"
|
||||
columns={2}
|
||||
wideLabels
|
||||
>
|
||||
<StandardFormField label="상수사용량 적용월" required columns={2}>
|
||||
{/* 연월 선택 라이브러리로 수정 필요 */}
|
||||
|
||||
@@ -518,6 +518,7 @@ export default function RTKForm() {
|
||||
key="form-section"
|
||||
title="분석 조건 및 자료"
|
||||
columns={2}
|
||||
wideLabels
|
||||
>
|
||||
<StandardFormField label="RTK계수 출처" required columns={2}>
|
||||
<Input {...form.register("rtkSource")} className="w-full" />
|
||||
|
||||
@@ -168,16 +168,16 @@ const FileUploadForm = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="w-full">
|
||||
{" "}
|
||||
{/* 컴포넌트 루트 div */}
|
||||
<div className="card p-6">
|
||||
<div className="card w-full p-6">
|
||||
{" "}
|
||||
{/* 카드 스타일링 */}
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="flex w-full items-center gap-2">
|
||||
{" "}
|
||||
{/* FileUploader와 Button을 정렬하는 메인 flex 컨테이너 */}
|
||||
<div className="mr-4 w-[300px]">
|
||||
<div className="min-w-0 flex-1">
|
||||
{" "}
|
||||
{/* FileUploader의 너비와 오른쪽 여백을 제어하는 컨테이너 */}
|
||||
<FileUploader
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ReactNode } from "react";
|
||||
import { createContext, useContext, type ReactNode } from "react";
|
||||
|
||||
import { Label } from "@common/components";
|
||||
|
||||
@@ -31,8 +31,11 @@ type StandardFormSectionProps = {
|
||||
children: ReactNode;
|
||||
columns?: StandardFormColumns;
|
||||
className?: string;
|
||||
wideLabels?: boolean;
|
||||
};
|
||||
|
||||
const StandardFormWideLabelsContext = createContext(false);
|
||||
|
||||
type StandardFormFieldProps = {
|
||||
id?: string;
|
||||
label: ReactNode;
|
||||
@@ -50,6 +53,7 @@ function StandardFormSection({
|
||||
children,
|
||||
columns = 3,
|
||||
className = "",
|
||||
wideLabels = false,
|
||||
}: StandardFormSectionProps) {
|
||||
return (
|
||||
<section
|
||||
@@ -58,11 +62,13 @@ function StandardFormSection({
|
||||
<h4 className="border-b border-border bg-container px-4 py-3 text-[1.4rem] font-semibold text-label">
|
||||
{title}
|
||||
</h4>
|
||||
<div
|
||||
className={`grid grid-cols-1 gap-px bg-border ${SECTION_GRID_CLASS[columns]}`}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
<StandardFormWideLabelsContext.Provider value={wideLabels}>
|
||||
<div
|
||||
className={`grid grid-cols-1 gap-px bg-border ${SECTION_GRID_CLASS[columns]}`}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
</StandardFormWideLabelsContext.Provider>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -78,9 +84,11 @@ function StandardFormField({
|
||||
children,
|
||||
className = "",
|
||||
}: StandardFormFieldProps) {
|
||||
const wideLabels = useContext(StandardFormWideLabelsContext);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`grid min-w-0 grid-cols-[9rem_minmax(0,1fr)] bg-background sm:grid-cols-[11.5rem_minmax(0,1fr)] ${FIELD_SPAN_CLASS[columns][span]} ${className}`}
|
||||
className={`grid min-w-0 grid-cols-[9rem_minmax(0,1fr)] bg-background ${wideLabels ? "sm:grid-cols-[18rem_minmax(0,1fr)]" : "sm:grid-cols-[11.5rem_minmax(0,1fr)]"} ${FIELD_SPAN_CLASS[columns][span]} ${className}`}
|
||||
>
|
||||
<Label
|
||||
htmlFor={id}
|
||||
@@ -89,7 +97,7 @@ function StandardFormField({
|
||||
{required ? <span className="mr-1 text-red-600">*</span> : null}
|
||||
{label}
|
||||
</Label>
|
||||
<div className="min-w-0 p-3">
|
||||
<div className="flex min-w-0 flex-col justify-center p-3">
|
||||
{children}
|
||||
{error ? (
|
||||
<p className="mt-1 text-[1.2rem] text-red-600" role="alert">
|
||||
|
||||
Reference in New Issue
Block a user