Skip to content

Commit

Permalink
Update PadCard.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
Tonnie-Dev committed Aug 14, 2024
1 parent 710ffc7 commit ab3586d
Showing 1 changed file with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewLightDark
import com.uxstate.launchpad.R
import com.uxstate.launchpad.domain.model.Launch
import com.uxstate.launchpad.presentation.ui.theme.LaunchPadTheme
import com.uxstate.launchpad.utils.LocalSpacing
import com.uxstate.launchpad.utils.generateLaunch

@Composable
fun PadCard(
Expand All @@ -33,7 +35,13 @@ fun PadCard(
modifier = modifier.padding(spacing.spaceSmall)
) {

Column(horizontalAlignment = Alignment.CenterHorizontally) {
Column(
modifier = Modifier.padding(
horizontal = spacing.spaceMedium,
vertical = spacing.spaceSmall
),
horizontalAlignment = Alignment.CenterHorizontally
) {
Text(
text = launch.pad.locationName,
style = MaterialTheme.typography.headlineSmall,
Expand Down Expand Up @@ -120,4 +128,16 @@ private fun PadCounterPreview() {
value = 13,
countDesc = stringResource(id = R.string.total_launches_text)
)
}


@PreviewLightDark
@Composable
private fun PadCardPreview() {
LaunchPadTheme {
PadCard(
launch = generateLaunch(),
onClickViewMap = { _, _ -> }
)
}
}

0 comments on commit ab3586d

Please sign in to comment.