ERP-node/frontend/components/numbering-rule/ManualConfigPanel.tsx

49 lines
1.4 KiB
TypeScript

"use client";
import React from "react";
import { Label } from "@/components/ui/label";
import { Input } from "@/components/ui/input";
interface ManualConfigPanelProps {
config?: {
value?: string;
placeholder?: string;
};
onChange: (config: any) => void;
isPreview?: boolean;
}
export const ManualConfigPanel: React.FC<ManualConfigPanelProps> = ({
config = {},
onChange,
isPreview = false,
}) => {
return (
<div className="space-y-3 sm:space-y-4">
<div>
<Label className="text-xs font-medium sm:text-sm"></Label>
<Input
value={config.value || ""}
onChange={(e) => onChange({ ...config, value: e.target.value })}
placeholder={config.placeholder || "값을 입력하세요"}
disabled={isPreview}
className="h-8 text-xs sm:h-10 sm:text-sm"
/>
<p className="mt-1 text-[10px] text-muted-foreground sm:text-xs">
</p>
</div>
<div>
<Label className="text-xs font-medium sm:text-sm"> ()</Label>
<Input
value={config.placeholder || ""}
onChange={(e) => onChange({ ...config, placeholder: e.target.value })}
placeholder="예: 부서코드 입력"
disabled={isPreview}
className="h-8 text-xs sm:h-10 sm:text-sm"
/>
</div>
</div>
);
};