Skip to content

Commit 34ced75

Browse files
committed
✨ remove overflow visible from expandable content, because the animation is not smooth
1 parent 5501dff commit 34ced75

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { motion } from 'motion/react';
22
import styled from 'styled-components';
33

4-
type StyledMotionExpandableContentProps = {
5-
$isOpen: boolean;
6-
};
7-
8-
export const StyledMotionExpandableContent = styled(motion.div)<StyledMotionExpandableContentProps>`
9-
overflow: ${({ $isOpen }) => ($isOpen ? 'visible' : 'hidden')};
4+
export const StyledMotionExpandableContent = styled(motion.div)`
5+
overflow: hidden;
106
`;

packages/core/src/components/expandable-content/ExpandableContent.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const ExpandableContent: FC<ExpandableContentProps> = ({ children, isOpen }) =>
1818
() => (
1919
<AnimatePresence initial={false}>
2020
<StyledMotionExpandableContent
21-
$isOpen={isOpen}
2221
animate={{ height: isOpen ? 'auto' : '0px' }}
2322
transition={{ duration: 0.2, type: 'tween' }}
2423
>

0 commit comments

Comments
 (0)