From abb0d5ab8a1422ef4d3c797fd113fbc4e7ebeafe Mon Sep 17 00:00:00 2001 From: Florent Maitre Date: Tue, 3 Dec 2024 18:26:14 +0100 Subject: [PATCH] Review: Move OudsIconButtonDefaults into OudsIconButton.kt and OudsIconDefaults into OudsIcon.kt --- .../core/component/button/OudsIconButton.kt | 8 +++++++ .../button/OudsIconButtonDefaults.kt | 24 ------------------- .../ouds/core/component/icon/OudsIcon.kt | 8 +++++++ .../core/component/icon/OudsIconDefaults.kt | 24 ------------------- 4 files changed, 16 insertions(+), 48 deletions(-) delete mode 100644 core/src/main/java/com/orange/ouds/core/component/button/OudsIconButtonDefaults.kt delete mode 100644 core/src/main/java/com/orange/ouds/core/component/icon/OudsIconDefaults.kt diff --git a/core/src/main/java/com/orange/ouds/core/component/button/OudsIconButton.kt b/core/src/main/java/com/orange/ouds/core/component/button/OudsIconButton.kt index 7da560f7..012364fa 100644 --- a/core/src/main/java/com/orange/ouds/core/component/button/OudsIconButton.kt +++ b/core/src/main/java/com/orange/ouds/core/component/button/OudsIconButton.kt @@ -13,6 +13,7 @@ package com.orange.ouds.core.component.button import androidx.compose.material3.IconButton +import androidx.compose.material3.LocalContentColor import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color @@ -31,3 +32,10 @@ internal fun OudsIconButton( OudsIcon(graphicsObject = graphicsObject, contentDescription = contentDescription, tint = tint, enabled = enabled) } } + +internal object OudsIconButtonDefaults { + + val tint: Color + @Composable + get() = LocalContentColor.current +} diff --git a/core/src/main/java/com/orange/ouds/core/component/button/OudsIconButtonDefaults.kt b/core/src/main/java/com/orange/ouds/core/component/button/OudsIconButtonDefaults.kt deleted file mode 100644 index 375105b4..00000000 --- a/core/src/main/java/com/orange/ouds/core/component/button/OudsIconButtonDefaults.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Software Name: OUDS Android - * SPDX-FileCopyrightText: Copyright (c) Orange SA - * SPDX-License-Identifier: MIT - * - * This software is distributed under the MIT license, - * the text of which is available at https://opensource.org/license/MIT/ - * or see the "LICENSE" file for more details. - * - * Software description: Android library of reusable graphical components - */ - -package com.orange.ouds.core.component.button - -import androidx.compose.material3.LocalContentColor -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color - -internal object OudsIconButtonDefaults { - - val tint: Color - @Composable - get() = LocalContentColor.current -} diff --git a/core/src/main/java/com/orange/ouds/core/component/icon/OudsIcon.kt b/core/src/main/java/com/orange/ouds/core/component/icon/OudsIcon.kt index e7260911..038a8539 100644 --- a/core/src/main/java/com/orange/ouds/core/component/icon/OudsIcon.kt +++ b/core/src/main/java/com/orange/ouds/core/component/icon/OudsIcon.kt @@ -13,6 +13,7 @@ package com.orange.ouds.core.component.icon import androidx.compose.material3.Icon +import androidx.compose.material3.LocalContentColor import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color @@ -35,3 +36,10 @@ internal fun OudsIcon( else -> {} } } + +internal object OudsIconDefaults { + + val tint: Color + @Composable + get() = LocalContentColor.current +} diff --git a/core/src/main/java/com/orange/ouds/core/component/icon/OudsIconDefaults.kt b/core/src/main/java/com/orange/ouds/core/component/icon/OudsIconDefaults.kt deleted file mode 100644 index ef0e493e..00000000 --- a/core/src/main/java/com/orange/ouds/core/component/icon/OudsIconDefaults.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Software Name: OUDS Android - * SPDX-FileCopyrightText: Copyright (c) Orange SA - * SPDX-License-Identifier: MIT - * - * This software is distributed under the MIT license, - * the text of which is available at https://opensource.org/license/MIT/ - * or see the "LICENSE" file for more details. - * - * Software description: Android library of reusable graphical components - */ - -package com.orange.ouds.core.component.icon - -import androidx.compose.material3.LocalContentColor -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color - -internal object OudsIconDefaults { - - val tint: Color - @Composable - get() = LocalContentColor.current -}