📝Requirement: Custom Drawer Component (React + styled-components)
🎯 Goal
Develop a reusable Custom Drawer Component (like Ant Design’s Drawer) in React (TSX) using styled-components, supporting customizable header/footer via callbacks and a fixed footer at the bottom.
✅ Features
-
Basic Drawer
- Open/close state (
visible or open prop)
- Overlay mask (optional)
- Configurable
width/height
-
Placement Options
-
Close Options
- Close on overlay click (
maskClosable)
- Close on ESC key
- Close button (X icon, optional)
-
Custom Header/Footer
renderHeader?: () => ReactNode → callback for custom header
renderFooter?: () => ReactNode → callback for custom footer
- Footer should stick to bottom with proper padding
-
Customizable
- Props for
title, closable, maskClosable
- Props for
zIndex, placement, animationDuration
-
Animation
- Smooth slide-in/out using styled-components
keyframes
- Placement-specific animation
-
Accessibility
role="dialog"
aria-modal="true"
- Trap focus inside drawer
- Close with
ESC
-
Responsive
- On mobile: full width (
100vw)
- On desktop: configurable width (
default 400px)
📂 Technical Requirements
- Language: TypeScript (TSX)
- Styling: styled-components (with theme support)
- Animation: styled-components keyframes
📌 Tasks (Issues)
Backlog
- Research Ant Design Drawer API for reference
- Define prop types in TypeScript
To Do
Review
Done
📝Requirement: Custom Drawer Component (React + styled-components)
🎯 Goal
Develop a reusable Custom Drawer Component (like Ant Design’s Drawer) in React (TSX) using styled-components, supporting customizable header/footer via callbacks and a fixed footer at the bottom.
✅ Features
Basic Drawer
visibleoropenprop)width/heightPlacement Options
left,right,top,bottomClose Options
maskClosable)Custom Header/Footer
renderHeader?: () => ReactNode→ callback for custom headerrenderFooter?: () => ReactNode→ callback for custom footerCustomizable
title,closable,maskClosablezIndex,placement,animationDurationAnimation
keyframesAccessibility
role="dialog"aria-modal="true"ESCResponsive
100vw)default 400px)📂 Technical Requirements
📌 Tasks (Issues)
Backlog
To Do
open,onClose)left/right/top/bottom) with animationsrenderHeaderandrenderFootercallbacksReview
Done
master