diff --git a/android/feature/leagueform/ui/src/main/java/ca/josephroque/bowlingcompanion/feature/leagueform/ui/LeagueForm.kt b/android/feature/leagueform/ui/src/main/java/ca/josephroque/bowlingcompanion/feature/leagueform/ui/LeagueForm.kt index 5c23f4b2a..6c85c4cf9 100644 --- a/android/feature/leagueform/ui/src/main/java/ca/josephroque/bowlingcompanion/feature/leagueform/ui/LeagueForm.kt +++ b/android/feature/leagueform/ui/src/main/java/ca/josephroque/bowlingcompanion/feature/leagueform/ui/LeagueForm.kt @@ -19,6 +19,7 @@ import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment @@ -28,11 +29,13 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.input.KeyboardCapitalization import androidx.compose.ui.text.input.KeyboardType +import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import ca.josephroque.bowlingcompanion.core.designsystem.components.ArchiveDialog import ca.josephroque.bowlingcompanion.core.designsystem.components.DiscardChangesDialog import ca.josephroque.bowlingcompanion.core.designsystem.components.form.FormRadioGroup import ca.josephroque.bowlingcompanion.core.designsystem.components.form.FormSection +import ca.josephroque.bowlingcompanion.core.designsystem.components.form.FormSectionFooter import ca.josephroque.bowlingcompanion.core.designsystem.components.form.FormSwitch import ca.josephroque.bowlingcompanion.core.model.ExcludeFromStatistics import ca.josephroque.bowlingcompanion.core.model.LeagueRecurrence @@ -129,8 +132,6 @@ fun LeagueForm( HorizontalDivider() - // TODO: add explanation with R.string-league_form_property_pinfall_footer - IncludeAdditionalPinFallSwitch( includeAdditionalPinFall = state.includeAdditionalPinFall, onIncludeAdditionalPinFallChanged = { @@ -143,8 +144,7 @@ fun LeagueForm( Column( verticalArrangement = Arrangement.spacedBy(8.dp), modifier = Modifier - .fillMaxWidth() - .padding(bottom = 16.dp), + .fillMaxWidth(), ) { AdditionalPinFallField( additionalPinFall = state.additionalPinFall, @@ -173,6 +173,8 @@ fun LeagueForm( IncludeAdditionalPinFall.NONE -> Unit } + FormSectionFooter(footerResourceId = R.string.league_form_property_pinfall_footer) + HorizontalDivider() FormSection(Modifier.padding(top = 16.dp)) { ExcludeFromStatisticsPicker( @@ -424,3 +426,16 @@ private fun AdditionalGamesField(additionalGames: Int, onAdditionalGamesChanged: .padding(horizontal = 16.dp), ) } + +@Preview +@Composable +private fun LeagueFormPreview() { + Surface { + LeagueForm( + state = LeagueFormUiState( +// includeAdditionalPinFall = IncludeAdditionalPinFall.INCLUDE + ), + onAction = {}, + ) + } +} \ No newline at end of file