diff --git a/client/src/components/Artifacts/Artifacts.tsx b/client/src/components/Artifacts/Artifacts.tsx index ff7f284b76..aa81ebfadc 100644 --- a/client/src/components/Artifacts/Artifacts.tsx +++ b/client/src/components/Artifacts/Artifacts.tsx @@ -17,7 +17,7 @@ import store from '~/store'; export default function Artifacts() { const localize = useLocalize(); const { isMutating } = useEditorContext(); - const isMobile = useMediaQuery('(max-width: 868px)'); // DO NOT change this value, it is used to determine the layout of the artifacts panel ONLY + const isMobile = useMediaQuery('(max-width: 868px)'); const editorRef = useRef(); const previewRef = useRef(); const [isVisible, setIsVisible] = useState(false); @@ -52,76 +52,95 @@ export default function Artifacts() { const closeArtifacts = () => { setIsVisible(false); - setTimeout(() => setArtifactsVisible(false), 300); + setTimeout(() => setArtifactsVisible(false), isMobile ? 400 : 500); }; return ( -
+
+ {/* Mobile backdrop */} + {isMobile && ( +