-
Notifications
You must be signed in to change notification settings - Fork 4
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
[WEB-3979] Additional modification props for Encapsulated icons #488
Conversation
WalkthroughThe changes in this pull request involve updating the version number of the 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)
src/core/Icon/EncapsulatedIcon.tsx (1)
16-18
: Nitpick: Maintain consistency in the order of the destructured props.Consider reordering the destructured props to match the order in which they are declared in the
EncapsulatedIconProps
type:- className, - innerClassName, iconSize, + className, + innerClassName, ...iconProps
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
src/core/Icon/__snapshots__/Icon.stories.tsx.snap
is excluded by!**/*.snap
src/core/ProductTile/__snapshots__/ProductTile.stories.tsx.snap
is excluded by!**/*.snap
Files selected for processing (2)
- package.json (1 hunks)
- src/core/Icon/EncapsulatedIcon.tsx (1 hunks)
Files skipped from review due to trivial changes (1)
- package.json
Additional comments not posted (4)
src/core/Icon/EncapsulatedIcon.tsx (4)
9-10
: LGTM!The addition of the optional
innerClassName
andiconSize
props enhances the flexibility and customization options for theEncapsulatedIcon
component. The types of the new props are appropriate.
23-25
: LGTM!The logic for determining the value of
numericalIconSize
based on theiconSize
prop is correct. IficonSize
is provided, it is parsed and used; otherwise, the previous behavior of subtracting 12 fromnumericalSize
is maintained.
33-33
: LGTM!The
innerClassName
prop is correctly added to theclassName
of the inner div, allowing for additional styling flexibility. The nullish coalescing operator??
is used appropriately to provide an empty string as a fallback ifinnerClassName
is not provided.
36-36
: LGTM!The
size
prop of theIcon
component is correctly set to the value ofnumericalIconSize
, which is determined based on theiconSize
prop or the default calculation. The value is properly interpolated into a string to match the expected type of thesize
prop.
Jira Ticket Link / Motivation
Summary of changes
Adds extra props to modify
EncapsulatedIcon
because the designs differ across the pages on how it should lookHow do you manually test this?
Reviewer Tasks (optional)
Merge/Deploy Checklist
Frontend Checklist
Summary by CodeRabbit
New Features
@ably/ui
package to 14.6.1, indicating potential bug fixes and improvements.EncapsulatedIcon
component for enhanced customization:innerClassName
for additional styling andiconSize
for specifying custom icon sizes.Bug Fixes