From 1f9403d4a2d75be9323de7e93d1eaae7c9f0b64b Mon Sep 17 00:00:00 2001 From: Pauline Auvray Date: Tue, 31 Jan 2023 09:55:04 +0100 Subject: [PATCH] [#415] Review: Rename components into componentsConfiguration --- .../main/java/com/orange/ods/demo/ui/components/chips/Chip.kt | 2 +- .../java/com/orange/ods/demo/ui/components/chips/ChipFilter.kt | 2 +- .../com/orange/ods/compose/component/textfield/OdsTextField.kt | 2 +- lib/src/main/java/com/orange/ods/compose/theme/OdsTheme.kt | 2 +- .../java/com/orange/ods/theme/OdsThemeConfigurationContract.kt | 2 +- .../ods/theme/innovationcup/InnovationCupThemeConfiguration.kt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/demo/src/main/java/com/orange/ods/demo/ui/components/chips/Chip.kt b/demo/src/main/java/com/orange/ods/demo/ui/components/chips/Chip.kt index acf1a4658..5646d768a 100644 --- a/demo/src/main/java/com/orange/ods/demo/ui/components/chips/Chip.kt +++ b/demo/src/main/java/com/orange/ods/demo/ui/components/chips/Chip.kt @@ -106,7 +106,7 @@ fun ChipTypeDemo(chipType: ChipType, content: @Composable () -> Unit) { @Composable private fun Chip(chipCustomizationState: ChipCustomizationState) { val context = LocalContext.current - val outlinedChips = LocalMainThemeManager.current.currentThemeConfiguration.components.chipStyle == ComponentStyle.Outlined + val outlinedChips = LocalMainThemeManager.current.currentThemeConfiguration.componentsConfiguration.chipStyle == ComponentStyle.Outlined val cancelCrossLabel = stringResource(id = R.string.component_element_cancel_cross) val recipes = LocalRecipes.current.take(4) diff --git a/demo/src/main/java/com/orange/ods/demo/ui/components/chips/ChipFilter.kt b/demo/src/main/java/com/orange/ods/demo/ui/components/chips/ChipFilter.kt index d0fd21eff..3e936ee16 100644 --- a/demo/src/main/java/com/orange/ods/demo/ui/components/chips/ChipFilter.kt +++ b/demo/src/main/java/com/orange/ods/demo/ui/components/chips/ChipFilter.kt @@ -78,7 +78,7 @@ fun ChipFilter() { @Composable private fun FilterChip(ingredient: Ingredient, customizationState: ChipCustomizationState) { - val outlinedChips = LocalMainThemeManager.current.currentThemeConfiguration.components.chipStyle == ComponentStyle.Outlined + val outlinedChips = LocalMainThemeManager.current.currentThemeConfiguration.componentsConfiguration.chipStyle == ComponentStyle.Outlined val selected = rememberSaveable { mutableStateOf(false) } OdsFilterChip( text = ingredient.food.name, diff --git a/lib/src/main/java/com/orange/ods/compose/component/textfield/OdsTextField.kt b/lib/src/main/java/com/orange/ods/compose/component/textfield/OdsTextField.kt index 0198b47f1..74d51a7b4 100644 --- a/lib/src/main/java/com/orange/ods/compose/component/textfield/OdsTextField.kt +++ b/lib/src/main/java/com/orange/ods/compose/component/textfield/OdsTextField.kt @@ -203,7 +203,7 @@ fun OdsTextField( maxLines: Int = Int.MAX_VALUE, characterCounter: @Composable (() -> Unit)? = null ) { - val filledTextField = OdsTheme.componentsConfiguration.textFieldStyle == OdsComponentsConfiguration.Companion.ComponentStyle.Filled + val filledTextField = OdsTheme.componentsConfiguration.textFieldStyle == OdsComponentsConfiguration.ComponentStyle.Filled if (filledTextField) { OdsFilledTextField( diff --git a/lib/src/main/java/com/orange/ods/compose/theme/OdsTheme.kt b/lib/src/main/java/com/orange/ods/compose/theme/OdsTheme.kt index f3e4d8819..b543a7523 100644 --- a/lib/src/main/java/com/orange/ods/compose/theme/OdsTheme.kt +++ b/lib/src/main/java/com/orange/ods/compose/theme/OdsTheme.kt @@ -92,7 +92,7 @@ fun OdsTheme( LocalDarkThemeColors provides themeConfiguration.colors.darkColors, LocalTypography provides themeConfiguration.typography, LocalShapes provides themeConfiguration.shapes, - LocalComponentsConfiguration provides themeConfiguration.components, + LocalComponentsConfiguration provides themeConfiguration.componentsConfiguration, content = content ) } diff --git a/theme-contract/src/main/java/com/orange/ods/theme/OdsThemeConfigurationContract.kt b/theme-contract/src/main/java/com/orange/ods/theme/OdsThemeConfigurationContract.kt index 1db5a3080..b012370f9 100644 --- a/theme-contract/src/main/java/com/orange/ods/theme/OdsThemeConfigurationContract.kt +++ b/theme-contract/src/main/java/com/orange/ods/theme/OdsThemeConfigurationContract.kt @@ -42,7 +42,7 @@ interface OdsThemeConfigurationContract : Parcelable { /** * Customization of the ODS components if needed */ - val components: OdsComponentsConfiguration + val componentsConfiguration: OdsComponentsConfiguration get() = OdsComponentsConfiguration() /** diff --git a/theme-innovation-cup/src/main/java/com/orange/ods/theme/innovationcup/InnovationCupThemeConfiguration.kt b/theme-innovation-cup/src/main/java/com/orange/ods/theme/innovationcup/InnovationCupThemeConfiguration.kt index 0f649ee16..61e6204b7 100644 --- a/theme-innovation-cup/src/main/java/com/orange/ods/theme/innovationcup/InnovationCupThemeConfiguration.kt +++ b/theme-innovation-cup/src/main/java/com/orange/ods/theme/innovationcup/InnovationCupThemeConfiguration.kt @@ -34,7 +34,7 @@ class InnovationCupThemeConfiguration : OdsThemeConfigurationContract { large = RoundedCornerShape(4.dp) ) - override val components: OdsComponentsConfiguration + override val componentsConfiguration: OdsComponentsConfiguration get() = object : OdsComponentsConfiguration() { override val chipStyle: ComponentStyle get() = ComponentStyle.Filled