style: center icon when action buttons use icon-only (#5413)
Some checks are pending
Build docker image / build-and-push (push) Waiting to run
Build pro image / build-and-push (push) Waiting to run
E2E / Build (push) Waiting to run
E2E / Core and plugins (push) Blocked by required conditions
E2E / plugin-workflow (push) Blocked by required conditions
E2E / plugin-workflow-approval (push) Blocked by required conditions
E2E / plugin-data-source-main (push) Blocked by required conditions
E2E / Comment on PR (push) Blocked by required conditions
NocoBase frontEnd test / frontend-test (18) (push) Waiting to run

This commit is contained in:
Katherine 2024-10-14 17:47:33 +08:00 committed by GitHub
parent 45f7a9bc7c
commit 227b9c59a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -47,6 +47,13 @@ const useStyles = genStyleHook('nb-action', (token) => {
},
},
},
'.ant-btn-icon': {
marginInlineEnd: '0px !important',
},
'.nb-action-title': {
marginInlineStart: '8px',
},
},
};
});

View File

@ -377,7 +377,6 @@ function RenderButton({
if (!designable && (field?.data?.hidden || !aclCtx)) {
return null;
}
return (
<SortableItem
role="button"
@ -393,7 +392,7 @@ function RenderButton({
className={classnames(componentCls, hashId, className, 'nb-action')}
type={type === 'danger' ? undefined : type}
>
{actionTitle}
{actionTitle && <span className={icon ? 'nb-action-title' : null}>{actionTitle}</span>}
<Designer {...designerProps} />
</SortableItem>
);