modify transitionDelay

This commit is contained in:
Gabe Yuan
2023-08-08 17:54:50 +08:00
parent 6aac1b2216
commit fe6543ac3f
2 changed files with 4 additions and 4 deletions

View File

@@ -38,7 +38,8 @@ export default function Draggable(props) {
const handlePointerUp = (e) => { const handlePointerUp = (e) => {
setOrigin(null); setOrigin(null);
if (props.name !== "fab") {
if (!props.goside) {
return; return;
} }
@@ -88,7 +89,7 @@ export default function Draggable(props) {
display: props.show ? "block" : "none", display: props.show ? "block" : "none",
transitionProperty: origin ? "none" : "all", transitionProperty: origin ? "none" : "all",
transitionDuration: "1s", transitionDuration: "1s",
transitionDelay: "1s", transitionDelay: "0.5s",
}} }}
onClick={handleClick} onClick={handleClick}
> >

View File

@@ -76,7 +76,6 @@ export default function Action() {
<ThemeProvider> <ThemeProvider>
<Draggable <Draggable
key="pop" key="pop"
name="pop"
{...popProps} {...popProps}
show={showPopup} show={showPopup}
onStart={handleStart} onStart={handleStart}
@@ -109,7 +108,7 @@ export default function Action() {
</Draggable> </Draggable>
<Draggable <Draggable
key="fab" key="fab"
name="fab" goside
{...fabProps} {...fabProps}
show={!showPopup} show={!showPopup}
onStart={handleStart} onStart={handleStart}