-
Notifications
You must be signed in to change notification settings - Fork 176
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
[Compound] implement IconButton changes #1049
[Compound] implement IconButton changes #1049
Conversation
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Kudos, SonarCloud Quality Gate passed! |
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.
One question, otherwise LGTM
@@ -36,11 +42,15 @@ fun IconButton( | |||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, | |||
content: @Composable () -> Unit | |||
) { | |||
val colors = IconButtonDefaults.iconButtonColors( | |||
contentColor = LocalContentColor.current, |
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.
Why are we using LocalContentColor
here and ElementTheme.colors
for disabled?
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.
The way it was designed in Figma, the icon button could use either primary or secondary colors, so it made more sense to just allow the parent component to decide which color should be used for the icon.
As for disabled state, it's always the same color for icons, so we can just hardcode it.
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.
Ok makes sense!
Changes:
LocalContentColor
for tinting.