mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-18 14:56:59 +08:00
chore(component): add a danger hover style for buttons (#7600)
Like other delete buttons. https://github.com/user-attachments/assets/85d1c3cb-bd17-4904-b671-c04c76bfd00b
This commit is contained in:
@@ -164,6 +164,10 @@ export const button = style({
|
|||||||
'&.processing.disabled:not(.without-hover):hover': {
|
'&.processing.disabled:not(.without-hover):hover': {
|
||||||
background: cssVar('processingColor'),
|
background: cssVar('processingColor'),
|
||||||
},
|
},
|
||||||
|
'&.danger:hover': {
|
||||||
|
color: cssVar('errorColor'),
|
||||||
|
background: cssVar('backgroundErrorColor'),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
globalStyle(`${button} > span`, {
|
globalStyle(`${button} > span`, {
|
||||||
@@ -359,5 +363,9 @@ export const iconButton = style({
|
|||||||
'&.processing.disabled:not(.without-hover):hover': {
|
'&.processing.disabled:not(.without-hover):hover': {
|
||||||
background: cssVar('processingColor'),
|
background: cssVar('processingColor'),
|
||||||
},
|
},
|
||||||
|
'&.danger:hover': {
|
||||||
|
color: cssVar('errorColor'),
|
||||||
|
background: cssVar('backgroundErrorColor'),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -423,6 +423,7 @@ const ImagePreviewModalImpl = ({
|
|||||||
<>
|
<>
|
||||||
<div className={styles.dividerStyle}></div>
|
<div className={styles.dividerStyle}></div>
|
||||||
<ButtonWithTooltip
|
<ButtonWithTooltip
|
||||||
|
className="danger"
|
||||||
data-testid="delete-button"
|
data-testid="delete-button"
|
||||||
tooltip="Delete"
|
tooltip="Delete"
|
||||||
icon={<DeleteIcon />}
|
icon={<DeleteIcon />}
|
||||||
|
|||||||
Reference in New Issue
Block a user