11import { useCallback , useEffect , useRef , useState , type PropsWithChildren } from 'react' ;
22import { cx } from '@styled-system/css' ;
3- import { motion , type PanInfo } from 'framer- motion' ;
3+ import { motion , type PanInfo } from 'motion/react ' ;
44
55import * as s from './style.css' ;
66
@@ -44,7 +44,7 @@ const DrawerBody = ({ children, title, description, close }: DrawerBodyProps) =>
4444 className = { s . Container }
4545 drag = { 'y' }
4646 dragConstraints = { { top : 0 , bottom : 0 } }
47- transition = { { duration : 0.2 } }
47+ transition = { { duration : 0.35 } }
4848 dragElastic = { 0.4 }
4949 variants = { {
5050 opened : { top : `calc(100dvh - ${ height } px)` } ,
@@ -55,15 +55,15 @@ const DrawerBody = ({ children, title, description, close }: DrawerBodyProps) =>
5555 exit = { 'closed' }
5656 onDragEnd = { onDragEnd }
5757 >
58- < header className = { s . Header } >
59- < div className = { s . HeaderTitle } >
60- < span className = { s . Title } > { title } </ span >
61- { description && < span className = { s . Description } > { description } </ span > }
62- </ div >
63- < button className = { cx ( 'mgc_close_line' , s . CloseButton ) } onClick = { close } / >
64- </ header >
65- < div ref = { contentRef } className = { s . Content } >
66- { children }
58+ < div ref = { contentRef } className = { s . Wrapper } >
59+ < header className = { s . Header } >
60+ < div className = { s . HeaderTitle } >
61+ < span className = { s . Title } > { title } </ span >
62+ { description && < span className = { s . Description } > { description } </ span > }
63+ </ div >
64+ < button className = { cx ( 'mgc_close_line' , s . CloseButton ) } onClick = { close } / >
65+ </ header >
66+ < div className = { s . Content } > { children } </ div >
6767 </ div >
6868 </ motion . div >
6969 ) ;
0 commit comments