diff --git a/packages/_helpers/expand-transition.tsx b/packages/_helpers/expand-transition.tsx index 4a70c0f6..d436fb49 100644 --- a/packages/_helpers/expand-transition.tsx +++ b/packages/_helpers/expand-transition.tsx @@ -8,7 +8,6 @@ export function ExpandTransition({ const [removeElement, setRemoveElement] = useState(!show); const expandableRef = useRef(null); const isMounted = useRef(false); - const initialShow = useRef(show === true); function collapseElement(el: HTMLElement) { collapse(el, () => setRemoveElement(true)); @@ -38,15 +37,8 @@ export function ExpandTransition({ } }, [show]); - // Set initial style to prevent glitching bug - const initialStyle = !initialShow.current ? 'overflow-hidden h-0' : undefined; - return ( -
+
{removeElement ? null : children}
); diff --git a/packages/expandable/stories/Expandable.stories.tsx b/packages/expandable/stories/Expandable.stories.tsx index 682c9e73..d29ec5b2 100644 --- a/packages/expandable/stories/Expandable.stories.tsx +++ b/packages/expandable/stories/Expandable.stories.tsx @@ -87,14 +87,6 @@ export const Animated = () => { ); }; -export const AnimatedExpanded = () => { - return ( - -

I am expandable

-
- ); -}; - export const Heading = () => { return (