mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
fix: image preview operations color (#44141)
This commit is contained in:
parent
e283ebf2e3
commit
8d1a41709f
@ -22,6 +22,11 @@ export interface ComponentToken {
|
|||||||
* @descEN Color of preview operation icon
|
* @descEN Color of preview operation icon
|
||||||
*/
|
*/
|
||||||
previewOperationColor: string;
|
previewOperationColor: string;
|
||||||
|
/**
|
||||||
|
* @desc 预览操作图标悬浮颜色
|
||||||
|
* @descEN Color of hovered preview operation icon
|
||||||
|
*/
|
||||||
|
previewOperationHoverColor: string;
|
||||||
/**
|
/**
|
||||||
* @desc 预览操作图标禁用颜色
|
* @desc 预览操作图标禁用颜色
|
||||||
* @descEN Disabled color of preview operation icon
|
* @descEN Disabled color of preview operation icon
|
||||||
@ -79,6 +84,7 @@ export const genPreviewOperationsStyle = (token: ImageToken): CSSObject => {
|
|||||||
margin,
|
margin,
|
||||||
paddingLG,
|
paddingLG,
|
||||||
previewOperationColorDisabled,
|
previewOperationColorDisabled,
|
||||||
|
previewOperationHoverColor,
|
||||||
motionDurationSlow,
|
motionDurationSlow,
|
||||||
iconCls,
|
iconCls,
|
||||||
colorTextLightSolid,
|
colorTextLightSolid,
|
||||||
@ -144,7 +150,7 @@ export const genPreviewOperationsStyle = (token: ImageToken): CSSObject => {
|
|||||||
userSelect: 'none',
|
userSelect: 'none',
|
||||||
|
|
||||||
[`&:not(${previewCls}-operations-operation-disabled):hover > ${iconCls}`]: {
|
[`&:not(${previewCls}-operations-operation-disabled):hover > ${iconCls}`]: {
|
||||||
opacity: 0.3,
|
color: previewOperationHoverColor,
|
||||||
},
|
},
|
||||||
|
|
||||||
'&-disabled': {
|
'&-disabled': {
|
||||||
@ -370,7 +376,10 @@ export default genComponentStyleHook(
|
|||||||
},
|
},
|
||||||
(token) => ({
|
(token) => ({
|
||||||
zIndexPopup: token.zIndexPopupBase + 80,
|
zIndexPopup: token.zIndexPopupBase + 80,
|
||||||
previewOperationColor: new TinyColor(token.colorTextLightSolid).toRgbString(),
|
previewOperationColor: new TinyColor(token.colorTextLightSolid).setAlpha(0.65).toRgbString(),
|
||||||
|
previewOperationHoverColor: new TinyColor(token.colorTextLightSolid)
|
||||||
|
.setAlpha(0.85)
|
||||||
|
.toRgbString(),
|
||||||
previewOperationColorDisabled: new TinyColor(token.colorTextLightSolid)
|
previewOperationColorDisabled: new TinyColor(token.colorTextLightSolid)
|
||||||
.setAlpha(0.25)
|
.setAlpha(0.25)
|
||||||
.toRgbString(),
|
.toRgbString(),
|
||||||
|
Loading…
Reference in New Issue
Block a user