Skip to content

Commit

Permalink
update: [ANDROAPP-5467] padding added
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAparicioAlbaAsenjo committed Sep 25, 2023
1 parent 5e834d0 commit 78f606e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ fun TimeUnitSelector(
) {
RowComponentContainer(
modifier = Modifier
.background(color = SurfaceColor.Surface, Shape.SmallBottom)
.padding(
start = Spacing.Spacing8,
end = Spacing.Spacing8,
)
.background(color = SurfaceColor.Surface, Shape.SmallBottom),
),
) {
val options = TimeUnitValues.values().map {
RadioButtonData(it.value, optionSelected == it.value, true, provideStringResource(it.value))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,9 @@ fun RadioButton(
fun RadioButtonBlock(
orientation: Orientation,
content: List<RadioButtonData>,
itemSelected: RadioButtonData,
itemSelected: RadioButtonData?,
onItemChange: (RadioButtonData) -> Unit,
) {
var currentItem by remember {
mutableStateOf(itemSelected)
}
if (orientation == Orientation.HORIZONTAL) {
FlowRowComponentsContainer(
null,
Expand All @@ -123,12 +120,11 @@ fun RadioButtonBlock(
RadioButton(
RadioButtonData(
radioButtonData.uid,
if (radioButtonData.enabled) radioButtonData == currentItem else radioButtonData.selected,
if (radioButtonData.enabled) radioButtonData == itemSelected else radioButtonData.selected,
radioButtonData.enabled,
radioButtonData.textInput,
),
) {
currentItem = radioButtonData
onItemChange.invoke(radioButtonData)
}
}
Expand All @@ -143,12 +139,11 @@ fun RadioButtonBlock(
RadioButton(
RadioButtonData(
radioButtonData.uid,
if (radioButtonData.enabled) radioButtonData == currentItem else radioButtonData.selected,
if (radioButtonData.enabled) radioButtonData == itemSelected else radioButtonData.selected,
radioButtonData.enabled,
radioButtonData.textInput,
),
) {
currentItem = radioButtonData
onItemChange.invoke(radioButtonData)
}
}
Expand Down

0 comments on commit 78f606e

Please sign in to comment.