Skip to content

Commit

Permalink
fix: The image preview operation bar is covered during the animation (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JarvisArt committed Dec 25, 2022
1 parent 06bd9d1 commit 7be364f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions components/image/style/index.tsx
Expand Up @@ -56,7 +56,6 @@ export const genPreviewOperationsStyle = (token: ImageToken): CSSObject => {
modalMaskBg,
paddingSM,
imagePreviewOperationDisabledColor,
zIndexPopup,
motionDurationSlow,
} = token;

Expand All @@ -66,14 +65,9 @@ export const genPreviewOperationsStyle = (token: ImageToken): CSSObject => {
return {
[`${previewCls}-operations`]: {
...resetComponent(token),
position: 'fixed',
insetBlockStart: 0,
insetInlineEnd: 0,
zIndex: zIndexPopup + 1,
display: 'flex',
flexDirection: 'row-reverse',
alignItems: 'center',
width: '100%',
color: token.imagePreviewOperationColor,
listStyle: 'none',
background: operationBg.toRgbString(),
Expand Down Expand Up @@ -236,6 +230,13 @@ export const genImagePreviewStyle: GenerateStyle<ImageToken> = (token: ImageToke

// Preview operations & switch
{
[`${componentCls}-preview-operations-wrapper`]: {
position: 'fixed',
insetBlockStart: 0,
insetInlineEnd: 0,
zIndex: token.zIndexPopup + 1,
width: '100%',
},
'&': [genPreviewOperationsStyle(token), genPreviewSwitchStyle(token)],
},
];
Expand Down

0 comments on commit 7be364f

Please sign in to comment.