코드 정리 및 변수 이름 변경: InteractiveScreenViewer 컴포넌트에서 변수 이름을 변경하여 가독성을 향상시키고, ButtonPrimaryComponent에서 선택된 데이터 변수를 업데이트했습니다. 또한, ScreenViewPage에서 불필요한 코드 충돌을 해결했습니다.
This commit is contained in:
@@ -568,7 +568,7 @@ export const InteractiveScreenViewer: React.FC<InteractiveScreenViewerProps> = (
|
||||
);
|
||||
}
|
||||
|
||||
const { widgetType, label, placeholder, required, readonly, columnName } = comp;
|
||||
const { widgetType, label: originalLabel, placeholder, required, readonly, columnName } = comp;
|
||||
const fieldName = columnName || comp.id;
|
||||
const currentValue = formData[fieldName] || "";
|
||||
|
||||
@@ -580,7 +580,6 @@ export const InteractiveScreenViewer: React.FC<InteractiveScreenViewerProps> = (
|
||||
const compLangKey = (comp as any).langKey;
|
||||
const label = compLangKey && translations[compLangKey] ? translations[compLangKey] : originalLabel;
|
||||
|
||||
=======
|
||||
const applyStyles = (element: React.ReactElement) => {
|
||||
if (!comp.style) return element;
|
||||
|
||||
@@ -1923,19 +1922,11 @@ export const InteractiveScreenViewer: React.FC<InteractiveScreenViewerProps> = (
|
||||
return applyStyles(
|
||||
<button
|
||||
onClick={handleButtonClick}
|
||||
<<<<<<< HEAD
|
||||
disabled={isReadonly}
|
||||
className={`focus:ring-ring w-full rounded-md px-3 py-2 text-sm font-medium transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none disabled:opacity-50 ${
|
||||
className={`w-full rounded-md px-3 py-2 text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ${
|
||||
hasCustomColors
|
||||
? ""
|
||||
: "bg-background border-foreground text-foreground hover:bg-muted/50 border shadow-xs"
|
||||
=======
|
||||
disabled={readonly}
|
||||
className={`w-full rounded-md px-3 py-2 text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ${
|
||||
hasCustomColors
|
||||
? ''
|
||||
: 'bg-background border border-foreground text-foreground shadow-xs hover:bg-muted/50'
|
||||
>>>>>>> ac0f4618321df78939e833f90768ae5404646fec
|
||||
: "bg-background border border-foreground text-foreground shadow-xs hover:bg-muted/50"
|
||||
}`}
|
||||
style={{
|
||||
height: "100%",
|
||||
|
||||
Reference in New Issue
Block a user