-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Drawer / Sidebar #285
base: main
Are you sure you want to change the base?
New Drawer / Sidebar #285
Conversation
children, | ||
}: DrawerProps) => { | ||
return ( | ||
<AnimatePresence> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can give this an exitBeforeEnter
prop so the exit animation can happen before framer removes the element from the dom.
// finalFocusRef, | ||
// returnFocusOnClose, | ||
// preserveScrollBarGap, | ||
children, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add a spread prop and pass it to motion.div
to expose motion props to the parent.
const DrawerComponent = ({
...,
children,
...motionProps
}: DrawerProps & MotionProps) => {
return (
<motion.div {...motionProps}>
)
}
What this PR does
Experimenting with a new sidebar and drawer components using some more modern and composable patterns
Testing
https://vimeo.github.io/iris/sb/sidebar-hotness/?path=/story/components-drawer