Skip to content

Commit

Permalink
Merge pull request #418 from kiwicom/toast-visual-updates
Browse files Browse the repository at this point in the history
Update Toast icon size to match the Text
  • Loading branch information
hrach committed Apr 26, 2023
2 parents 819efa1 + 88c50db commit 7c2f70f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
19 changes: 9 additions & 10 deletions ui/src/main/java/kiwi/orbit/compose/ui/controls/Toast.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.widthIn
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
Expand All @@ -38,6 +37,7 @@ import kiwi.orbit.compose.ui.OrbitTheme
import kiwi.orbit.compose.ui.controls.internal.OrbitPreviews
import kiwi.orbit.compose.ui.controls.internal.Preview
import kiwi.orbit.compose.ui.foundation.LocalContentColor
import kiwi.orbit.compose.ui.foundation.ProvideMergedTextStyle
import kiwi.orbit.compose.ui.utils.durationScale
import kotlin.math.absoluteValue
import kotlin.math.roundToInt
Expand Down Expand Up @@ -129,16 +129,15 @@ private fun Toast(
.padding(12.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
if (icon != null) {
Icon(
icon(),
contentDescription = null,
modifier = Modifier
.padding(top = 2.dp)
.size(16.dp),
)
ProvideMergedTextStyle(OrbitTheme.typography.bodyNormal) {
if (icon != null) {
Icon(
icon(),
contentDescription = null,
)
}
Text(message)
}
Text(message, style = OrbitTheme.typography.bodyNormal)
}
}
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7c2f70f

Please sign in to comment.