feat: modify the type of animation that appears for the pendant Add button

This commit is contained in:
QiShaoXuan
2022-08-03 11:14:52 +08:00
parent dd4360fb79
commit 727c742889
2 changed files with 9 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
import {
MuiZoom,
MuiFade,
Popover,
PopperHandler,
styled,
@@ -100,16 +100,15 @@ export const PendantRender = ({ block }: { block: AsyncBlock }) => {
);
})}
{hasAddBtn ? (
<MuiZoom in={showAddBtn}>
<MuiFade in={showAddBtn}>
<div>
<AddPendantPopover
block={block}
iconStyle={{ marginTop: 4 }}
container={blockRenderContainerRef.current}
trigger="click"
/>
</div>
</MuiZoom>
</MuiFade>
) : null}
</BlockPendantContainer>
);

View File

@@ -51,6 +51,7 @@ import {
tooltipClasses,
Typography,
Zoom,
Fade,
} from '@mui/material';
export { alpha } from '@mui/system';
@@ -233,6 +234,11 @@ export const MuiInput = Input;
*/
export const MuiZoom = Zoom;
/**
* @deprecated It is not recommended to use Mui directly, because the design will not refer to Mui's interaction logic.
*/
export const MuiFade = Fade;
/**
* @deprecated It is not recommended to use Mui directly, because the design will not refer to Mui's interaction logic.
*/