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

fix(Drawer): add max width to prevent width overflow for small screens #42914

Merged
merged 2 commits into from
Jun 9, 2023

Conversation

amir2mi
Copy link
Contributor

@amir2mi amir2mi commented Jun 7, 2023

💡 Background and solution

<Drawer /> component like <Modal /> accepts width, however unlike modal it does not have max-width for cases when screen width is lower than drawer width.
ezgif-1-6749806e42

This pull request set the max-width to 100% for drawer wrapper in drawer styles file.

The result will be:
Screenshot from 2023-06-07 23-52-13

🚀 Summary

🤖 Generated by Copilot at 00d404b

Fix drawer overflow bug on small devices by adding maxWidth to drawer style. Update components/drawer/style/index.ts to implement this change.

🔍 Walkthrough

🤖 Generated by Copilot at 00d404b

  • Add maxWidth property to drawer style to prevent overflow on small screens (link)

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2023

@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (87ee19e) 99.99% compared to head (0ac1d40) 99.99%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #42914   +/-   ##
=======================================
  Coverage   99.99%   99.99%           
=======================================
  Files         648      648           
  Lines       10951    10951           
  Branches     2969     2969           
=======================================
  Hits        10950    10950           
  Misses          1        1           
Impacted Files Coverage Δ
components/drawer/style/index.ts 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Co-authored-by: afc163 <afc163@gmail.com>
@afc163 afc163 merged commit 486e326 into ant-design:master Jun 9, 2023
@zombieJ zombieJ mentioned this pull request Jun 19, 2023
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants