diff --git a/catalog/src/main/java/kiwi/orbit/compose/catalog/screens/CardsScreen.kt b/catalog/src/main/java/kiwi/orbit/compose/catalog/screens/CardsScreen.kt index 66abd9a10..06f4c1f62 100644 --- a/catalog/src/main/java/kiwi/orbit/compose/catalog/screens/CardsScreen.kt +++ b/catalog/src/main/java/kiwi/orbit/compose/catalog/screens/CardsScreen.kt @@ -5,11 +5,9 @@ import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.size import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.runtime.Composable @@ -22,7 +20,6 @@ import androidx.compose.ui.unit.dp import kiwi.orbit.compose.catalog.Screen import kiwi.orbit.compose.illustrations.Illustrations import kiwi.orbit.compose.ui.OrbitTheme -import kiwi.orbit.compose.ui.controls.ButtonPrimary import kiwi.orbit.compose.ui.controls.Card import kiwi.orbit.compose.ui.controls.Separator import kiwi.orbit.compose.ui.controls.Text @@ -78,13 +75,7 @@ private fun CardScreenInner() { } else null, modifier = Modifier.fillMaxWidth(), ) { - Column(Modifier.padding(16.dp)) { - Image(Illustrations.AirHelp, contentDescription = null) - Spacer(Modifier.size(8.dp)) - ButtonPrimary(onClick = {}) { - Text("Primary Button") - } - } + Image(Illustrations.AirHelp, contentDescription = null) } } } diff --git a/ui/src/main/java/kiwi/orbit/compose/ui/controls/Card.kt b/ui/src/main/java/kiwi/orbit/compose/ui/controls/Card.kt index f0ebb4cef..10807465c 100644 --- a/ui/src/main/java/kiwi/orbit/compose/ui/controls/Card.kt +++ b/ui/src/main/java/kiwi/orbit/compose/ui/controls/Card.kt @@ -5,7 +5,6 @@ import androidx.compose.foundation.Indication import androidx.compose.foundation.LocalIndication import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.runtime.Composable -import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color @@ -14,7 +13,6 @@ import androidx.compose.ui.semantics.Role import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import kiwi.orbit.compose.ui.OrbitTheme -import kiwi.orbit.compose.ui.foundation.LocalSmallButtonScope import kiwi.orbit.compose.ui.foundation.contentColorFor @Composable @@ -27,19 +25,15 @@ public fun Card( elevation: Dp = 2.dp, content: @Composable () -> Unit ) { - CompositionLocalProvider( - LocalSmallButtonScope provides true, - ) { - Surface( - modifier = modifier, - shape = shape, - color = backgroundColor, - contentColor = contentColor, - elevation = elevation, - border = border, - content = content - ) - } + Surface( + modifier = modifier, + shape = shape, + color = backgroundColor, + contentColor = contentColor, + elevation = elevation, + border = border, + content = content + ) } @Composable @@ -58,23 +52,19 @@ public fun Card( role: Role? = null, content: @Composable () -> Unit ) { - CompositionLocalProvider( - LocalSmallButtonScope provides true, - ) { - Surface( - onClick = onClick, - modifier = modifier, - shape = shape, - color = backgroundColor, - contentColor = contentColor, - border = border, - elevation = elevation, - interactionSource = interactionSource, - indication = indication, - enabled = enabled, - onClickLabel = onClickLabel, - role = role, - content = content - ) - } + Surface( + onClick = onClick, + modifier = modifier, + shape = shape, + color = backgroundColor, + contentColor = contentColor, + border = border, + elevation = elevation, + interactionSource = interactionSource, + indication = indication, + enabled = enabled, + onClickLabel = onClickLabel, + role = role, + content = content + ) }