Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Conversation

@kylerberry
Copy link
Collaborator

@kylerberry kylerberry commented Jun 30, 2023

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

@kylerberry kylerberry changed the title initial commit on a new drawer component New Drawer / Sidebar Jun 30, 2023
children,
}: DrawerProps) => {
return (
<AnimatePresence>
Copy link
Collaborator

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,
Copy link
Collaborator

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}>
  )
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants