Skip to content
Source
Sign inSign up
fuko/trytanstackdb.com

Fix a horizontal overflow bug #35

Mergedfukomerged 1 commit intomain fromrefs/pull/35/headmerged by fuko View on GitHub

Showing 1 changed file with 69 additions and 56 deletions.

x
0 of 1 viewed, 1 left
69 additions and 56 deletionssrc/components/ApiRequestsPanel.tsxModified
View file
@@ -5,7 +5,7 @@
LoaderIcon,
Trash2Icon,
} from "lucide-react";
-import { motion } from "motion/react";
+import { AnimatePresence, motion } from "motion/react";
import { useState } from "react";
import {
type ApiRequest,
@@ -169,62 +169,75 @@
const isApiPanelOpen = userPreferences?.networkPanel === "open";
​
return (
- <motion.div
- initial={false}
- animate={{
- width: isApiPanelOpen ? API_PANEL_WIDTH : 0,
- }}
- className="shrink-0 h-full overflow-hidden border-l border-border"
- transition={{
- duration: PANEL_ANIMATION_DURATION,
- delay: isApiPanelOpen ? 0 : PANEL_ANIMATION_DURATION,
- }}
- >
- <motion.div