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

View File

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