-
Notifications
You must be signed in to change notification settings - Fork 276
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(button): [button] solve the problem of uneven button graphics when mixing #2347
Conversation
WalkthroughThe changes in this pull request involve updates to the styles of the button and modal components in their respective Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
packages/theme/src/button/index.less (1)
346-348
: Improved button layout for mixed content. Consider addingjustify-content
.The changes to the
.is-icon
class effectively address the issue of uneven button graphics when mixing content. The use ofinline-flex
andalign-items: center
ensures better alignment of icons and text.Consider adding
justify-content: center;
to the.is-icon
class to ensure horizontal centering as well:&.is-icon { display: inline-flex; align-items: center; + justify-content: center; }
This addition would provide more consistent centering for various button sizes and content lengths.
Also applies to: 354-354
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- packages/theme/src/button/index.less (1 hunks)
- packages/theme/src/modal/index.less (1 hunks)
🧰 Additional context used
🔇 Additional comments (2)
packages/theme/src/modal/index.less (1)
113-120
: Improved modal content structure and flexibility.The introduction of the
.@{modal-prefix-cls}__content
wrapper class enhances the organization and flexibility of the modal's content area. Settingwidth: 100%
andflex-grow: 1
ensures optimal space utilization, addressing the issue of modal content not expanding properly as mentioned in the PR objectives.packages/theme/src/button/index.less (1)
Line range hint
1-391
: Overall improvements to button stylingThe changes in this file effectively address the PR objective of fixing uneven button graphics when mixing content. The modifications to the
.is-icon
class improve the alignment and layout of buttons with icons, enhancing the overall visual consistency of the component.The changes are focused and do not introduce any breaking changes or negatively impact other parts of the button styling. The updated comment also improves code readability and maintainability.
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
解决button按钮对不齐和modal内容撑不开的问题
Summary by CodeRabbit
New Features
Bug Fixes
These updates improve the visual presentation and layout consistency of buttons and modals within the application.