Skip to content
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

Update ResponsiveDrawer.js #44240

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update ResponsiveDrawer.js #44240

wants to merge 1 commit into from

Conversation

AlexMuia31
Copy link

@AlexMuia31 AlexMuia31 commented Oct 28, 2024

In this proposed change I use useMediaQuery and useTheme hooks to make the Drawer component responsive. I am using the Drawer component once instead of how it used twice in docs. I change the variant of the Drawer according to the screen width using the useMediaQuery and useTheme hooks. Just trying to implement it with the DRY principal. One drawer for both mobile and Desktop shown according to Device. If Desktop then the Drawer is permanent and if the Device is a mobile Device then the SAME Drawer is Temporary.

In this proposed change I use useMediaQuery and useTheme hooks to make the Drawer component responsive. I am using the Drawer component once instead of how it used twice in docs. I change the variant of the Drawer according to the screen width using the useMediaQuery and useTheme hooks. Just trying to implement it with the DRY principal. One drawer for both mobile and Desktop shown according to Device. If Desktop then the Drawer is permanent and if the Device is a mobile Device then the SAME Drawer is Temporary.

Signed-off-by: MuiaAlex <[email protected]>
@mui-bot
Copy link

mui-bot commented Oct 28, 2024

Netlify deploy preview

https://deploy-preview-44240--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against c07f3d0

@zannager zannager added the component: drawer This is the name of the generic UI component, not the React module! label Oct 28, 2024
@oliviertassinari oliviertassinari added the PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI label Oct 29, 2024
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexMuia31 Thanks for the pull request! The proposed idea looks good. Could you fix the CI and update the PR title? See the CONTRIBUTING guide for tips on creating a good PR.

@ZeeshanTamboli ZeeshanTamboli added the docs Improvements or additions to the documentation label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: drawer This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants