cisco-sbg-ui / magna-react

magna-react.vercel.app
5 stars 0 forks source link

Proposal: Responsive Width Drawer #938

Closed Graham187K closed 4 weeks ago

Graham187K commented 4 weeks ago

Figma for reference: https://www.figma.com/design/zYfa9Hqw0D8b5hpuVwqMeQ/Reusable-Drawer-components-FY24?node-id=1823-23370&node-type=rounded_rectangle&m=dev

Magnetic Drawer Width guidelines

Incident manager needs to implement most ADrawers to have a variable width depending on the viewport width. This follows Magnetic guidelines for Drawer width and responsive breakpoints.

Breakpoint Viewport Drawer
SM 960px 400px
md 1280px 400px
LG 1680px 576px
XL 2080px 768px

This PR implements a new prop responsiveWidth on ADrawer.

<ADrawer 
  responsiveWidth={true} 
  {...otherProps}
/>

When responsiveWidth={true} prop is set, the Drawer width will automatically be responsive. For backward compatibility, when the openWidth prop is set, then it will supersede the responsiveWidth prop and the Drawer will have a fixed width. If neither prop are provided, then the Drawer will remain at it's default width at all times.

vercel[bot] commented 4 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
magna-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 5:13pm