Skip to content

Commit

Permalink
[#613] Fix code implementation for buttons, use new API
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinea authored and florentmaitre committed Sep 6, 2023
1 parent 691e2bb commit 8ca7e37
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ fun ButtonsContained(customizationState: ButtonCustomizationState) {
parameters = {
simple("style", buttonStyle.value.fullName)
if (hasFullScreenWidth) fillMaxWidth()
if (hasLeadingIcon) icon()
if (hasLeadingIcon) {
classInstance("icon", OdsButtonIcon::class.java) {
painter()
}
}
if (!isEnabled) enabled(false)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ fun ButtonsOutlined(customizationState: ButtonCustomizationState) {
exhaustiveParameters = false,
parameters = {
if (hasFullScreenWidth) fillMaxWidth()
if (hasLeadingIcon) icon()
if (hasLeadingIcon) {
classInstance("icon", OdsButtonIcon::class.java) {
painter()
}
}
if (!isEnabled) enabled(false)
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ fun ButtonsText(customizationState: ButtonCustomizationState) {
parameters = {
simple("style", textButtonStyle.value.fullName)
if (hasFullScreenWidth) fillMaxWidth()
if (hasLeadingIcon) icon()
if (hasLeadingIcon) {
classInstance("icon", OdsButtonIcon::class.java) {
painter()
}
}
if (!isEnabled) enabled(false)
}
)
Expand Down

0 comments on commit 8ca7e37

Please sign in to comment.