Skip to content

Commit

Permalink
[#415] Review: Rename components into componentsConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinea authored and florentmaitre committed Jan 31, 2023
1 parent 8ca8854 commit 1f9403d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion lib/src/main/java/com/orange/ods/compose/theme/OdsTheme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface OdsThemeConfigurationContract : Parcelable {
/**
* Customization of the ODS components if needed
*/
val components: OdsComponentsConfiguration
val componentsConfiguration: OdsComponentsConfiguration
get() = OdsComponentsConfiguration()

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1f9403d

Please sign in to comment.