fix(plugin-workflow): fix job button style ()

This commit is contained in:
Junyi 2023-07-13 12:32:00 +07:00 committed by GitHub
parent 0ba1c3d5c7
commit 5638a2fa2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 9 deletions
packages/plugins/workflow/src/client

View File

@ -235,7 +235,7 @@ function InnerJobButton({ job, ...props }) {
const { icon, color } = JobStatusOptionsMap[job.status]; const { icon, color } = JobStatusOptionsMap[job.status];
return ( return (
<Button {...props} shape="circle" className={cx(nodeJobButtonClass, props.className)}> <Button {...props} shape="circle" size="small" className={cx(nodeJobButtonClass, props.className)}>
<Tag color={color}>{icon}</Tag> <Tag color={color}>{icon}</Tag>
</Button> </Button>
); );
@ -279,6 +279,7 @@ export function JobButton() {
<div <div
className={css` className={css`
display: flex; display: flex;
align-items: center;
gap: 0.5em; gap: 0.5em;
time { time {

View File

@ -241,14 +241,10 @@ export const nodeCardClass = css`
export const nodeJobButtonClass = css` export const nodeJobButtonClass = css`
display: flex; display: flex;
position: absolute; position: absolute;
top: 1.25em; top: calc(1em - 1px);
right: 1.25em; right: 1em;
width: 1.25rem;
height: 1.25rem;
min-width: 1.25rem;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-size: 0.8em;
color: #fff; color: #fff;
&[type='button'] { &[type='button'] {
@ -261,8 +257,9 @@ export const nodeJobButtonClass = css`
.ant-tag { .ant-tag {
padding: 0; padding: 0;
width: 100%; width: 24px;
line-height: 18px; height: 24px;
line-height: 22px;
margin-right: 0; margin-right: 0;
border-radius: 50%; border-radius: 50%;
text-align: center; text-align: center;

View File

@ -83,6 +83,7 @@ function TriggerExecution() {
'x-component-props': { 'x-component-props': {
title: <InfoOutlined />, title: <InfoOutlined />,
shape: 'circle', shape: 'circle',
size: 'small',
className: nodeJobButtonClass, className: nodeJobButtonClass,
type: 'primary', type: 'primary',
}, },