feat: Implement button iconization feature for screen designer

- Added a comprehensive plan for expanding button display modes in the screen designer, allowing for text, icon, and icon+text modes.
- Introduced a new `ButtonIconRenderer` component to handle dynamic rendering of buttons based on selected display modes and actions.
- Enhanced the `ButtonConfigPanel` to include UI for selecting display modes and managing icon settings, including size, color, and position.
- Implemented functionality for custom icon addition via lucide search and SVG paste, ensuring flexibility for users.
- Updated relevant components to utilize the new button rendering logic, improving the overall user experience and visual consistency.

Made-with: Cursor
This commit is contained in:
syc0123
2026-03-04 16:30:05 +09:00
parent a0cf9db6e8
commit 6ceed2acd0
12 changed files with 1793 additions and 63 deletions
@@ -47,6 +47,7 @@ import { useFormValidation } from "@/hooks/useFormValidation";
import { V2ColumnInfo as ColumnInfo } from "@/types";
import { isFileComponent } from "@/lib/utils/componentTypeUtils";
import { buildGridClasses } from "@/lib/constants/columnSpans";
import { ButtonIconRenderer } from "@/lib/button-icon-map";
import { cn } from "@/lib/utils";
import { useScreenPreview } from "@/contexts/ScreenPreviewContext";
import { TableOptionsProvider } from "@/contexts/TableOptionsContext";
@@ -2054,7 +2055,7 @@ export const InteractiveScreenViewer: React.FC<InteractiveScreenViewerProps> = (
borderColor: config?.borderColor,
}}
>
{label || "버튼"}
<ButtonIconRenderer componentConfig={(component as any).componentConfig} fallbackLabel={label || "버튼"} />
</button>
);
}