-
Notifications
You must be signed in to change notification settings - Fork 36
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
Drawer #190
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ui/drawer/package.json
Outdated
{ | ||
"name": "@washingtonpost/wpds-drawer", | ||
"version": "0.13.0", | ||
"description": "> TODO: description", |
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.
Can we update this field?
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.
updated in e6cf4e6
type DrawerCloseProps = React.ComponentPropsWithRef<typeof CloseButton> & { | ||
sticky?: boolean; | ||
/** @default compact */ | ||
density?: "default" | "compact"; |
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.
not a blocker, but how do you feel about using enums for these? That way we can avoid user spelling mistakes
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.
For a simple case like this an enum doesn't feel necessary. The union of string literals will provide completions and throw errors for typos.
Maybe for creating more understandable values or something that needs to be iterated, otherwise enums feel cumbersome.
What I did
This PR adds a Drawer component, based on the initial v0 implementation
API Changes
DrawerRoot
DrawerTrigger
data-qa
prop directlyDrawerContent
Component Structure
Drawer favors splitting sub-components into individual files and the inclusion of unit tests for these files