Skip to content

Commit

Permalink
[#624] Update code implementation after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
florentmaitre authored and paulinea committed Sep 21, 2023
1 parent 2328150 commit e30c1a3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private fun Chip(chipCustomizationState: ChipCustomizationState) {
lambda("onValueChange")
list("chips") {
recipes.forEachIndexed { index, recipe ->
classInstance(OdsChoiceChip::class.java) {
classInstance<OdsChoiceChip<*>> {
text(recipe.title)
stringRepresentation("value", index)
if (!isEnabled) enabled(false)
Expand Down Expand Up @@ -175,13 +175,13 @@ private fun Chip(chipCustomizationState: ChipCustomizationState) {
parameters = {
text(recipe?.title.orEmpty())
if (isActionChip || hasLeadingIcon) {
classInstance("leadingIcon", OdsChipLeadingIcon::class.java) {
classInstance<OdsChipLeadingIcon>("leadingIcon") {
painter()
contentDescription("")
}
}
if (hasLeadingAvatar) {
classInstance("leadingAvatar", OdsChipLeadingAvatar::class.java) {
classInstance<OdsChipLeadingAvatar>("leadingAvatar") {
image()
contentDescription("")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fun ChipFilter() {
parameters = {
text(ingredient.food.name)
if (hasLeadingAvatar) {
classInstance("leadingAvatar", OdsChipLeadingAvatar::class.java) {
classInstance<OdsChipLeadingAvatar>("leadingAvatar") {
image()
contentDescription("")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ fun ComponentFloatingActionButton() {
name = usedComponentName,
exhaustiveParameters = false,
parameters = {
classInstance("icon", OdsFloatingActionButtonIcon::class.java) {
classInstance<OdsFloatingActionButtonIcon>("icon") {
painter()
contentDescription("")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,21 +145,21 @@ fun ComponentImageTile() {
name = OdsComposable.OdsImageTile.name,
exhaustiveParameters = false,
parameters = {
stringRepresentation("legendAreaDisplayType", type.value)
enum("legendAreaDisplayType", type.value)
if (hasText) title(recipe.title)
classInstance("image", OdsImageTileImage::class.java) {
classInstance<OdsImageTileImage>("image") {
painter()
contentDescription("")
}
if (hasIcon) {
classInstance("icon", OdsImageTileIconToggleButton::class.java) {
classInstance<OdsImageTileIconToggleButton>("icon") {
checked(iconChecked)
lambda("onCheckedChange")
classInstance("uncheckedIcon", OdsIconButtonIcon::class.java) {
classInstance<OdsIconButtonIcon>("uncheckedIcon") {
painter()
contentDescription("")
}
classInstance("checkedIcon", OdsIconButtonIcon::class.java) {
classInstance<OdsIconButtonIcon>("checkedIcon") {
painter()
contentDescription("")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ fun ProgressLinear() {
if (type.value == ProgressCustomizationState.Type.Determinate) stringRepresentation("progress", determinateProgressValue)
if (hasLabel) string("label", text)
if (hasIcon) {
classInstance("icon", OdsLinearProgressIndicatorIcon::class.java) {
classInstance<OdsLinearProgressIndicatorIcon>("icon") {
painter()
contentDescription("")
}
Expand Down

0 comments on commit e30c1a3

Please sign in to comment.