feat: add bulk update script for COMPANY_7 button styles
- Introduced a new script `btn-bulk-update-company7.ts` to facilitate bulk updates of button styles for COMPANY_7. - The script includes functionalities for testing, running updates, creating backups, and restoring from backups. - Implemented logic to dynamically apply button styles based on action types, ensuring consistent UI across the application. - Updated documentation to reflect changes in button icon mapping and dynamic loading of icons. This addition enhances the maintainability and consistency of button styles for COMPANY_7, streamlining the update process.
This commit is contained in:
@@ -502,15 +502,22 @@ export const ButtonPrimaryComponent: React.FC<ButtonPrimaryComponentProps> = ({
|
||||
if (component.style?.backgroundColor) {
|
||||
return component.style.backgroundColor;
|
||||
}
|
||||
// 4순위: style.labelColor (레거시)
|
||||
// 4순위: componentConfig.style.backgroundColor
|
||||
if (componentConfig.style?.backgroundColor) {
|
||||
return componentConfig.style.backgroundColor;
|
||||
}
|
||||
// 5순위: style.labelColor (레거시 호환)
|
||||
if (component.style?.labelColor) {
|
||||
return component.style.labelColor;
|
||||
}
|
||||
// 기본값: 삭제 버튼이면 빨강, 아니면 파랑
|
||||
if (isDeleteAction()) {
|
||||
return "#ef4444"; // 빨간색 (Tailwind red-500)
|
||||
}
|
||||
return "#3b82f6"; // 파란색 (Tailwind blue-500)
|
||||
// 6순위: 액션별 기본 배경색
|
||||
const excelActions = ["excel_download", "excel_upload", "multi_table_excel_upload"];
|
||||
const actionType = typeof componentConfig.action === "string"
|
||||
? componentConfig.action
|
||||
: componentConfig.action?.type || "";
|
||||
if (actionType === "delete") return "#F04544";
|
||||
if (excelActions.includes(actionType)) return "#212121";
|
||||
return "#3B83F6";
|
||||
};
|
||||
|
||||
const getButtonTextColor = () => {
|
||||
|
||||
Reference in New Issue
Block a user