forked from openMF/android-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Migrate :core:designsystem to KMP (openMF#2290)
* Directory restructure :core:designsystem to KMP * Feat: Configure theme and color * Updated components, theme, utils, colors * Update files after ci-prepush run * Fix issues related to stringResources and R class * Update files after ci-prepush run * Separate utils and utility * Refactor: Remove explicit color, size, and typography definitions * Remove mistakenly added file * Refactor: Update typography, colors
- Loading branch information
Showing
70 changed files
with
4,424 additions
and
751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
core/designsystem/src/androidMain/kotlin/com/mifos/core/designsystem/theme/Theme.android.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright 2025 Mifos Initiative | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
* | ||
* See https://github.com/openMF/android-client/blob/master/LICENSE.md | ||
*/ | ||
package com.mifos.core.designsystem.theme | ||
|
||
import android.os.Build | ||
import androidx.compose.material3.ColorScheme | ||
import androidx.compose.material3.dynamicDarkColorScheme | ||
import androidx.compose.material3.dynamicLightColorScheme | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.platform.LocalContext | ||
|
||
@Composable | ||
actual fun colorScheme(useDarkTheme: Boolean, dynamicColor: Boolean): ColorScheme { | ||
return when { | ||
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { | ||
val context = LocalContext.current | ||
if (useDarkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) | ||
} | ||
|
||
useDarkTheme -> darkScheme | ||
else -> lightScheme | ||
} | ||
} |
File renamed without changes.
Binary file added
BIN
+148 KB
core/designsystem/src/commonMain/composeResources/font/poppins_black.ttf
Binary file not shown.
Binary file added
BIN
+150 KB
core/designsystem/src/commonMain/composeResources/font/poppins_bold.ttf
Binary file not shown.
Binary file added
BIN
+149 KB
core/designsystem/src/commonMain/composeResources/font/poppins_extra_bold.ttf
Binary file not shown.
Binary file added
BIN
+158 KB
core/designsystem/src/commonMain/composeResources/font/poppins_extra_light.ttf
Binary file not shown.
Binary file added
BIN
+156 KB
core/designsystem/src/commonMain/composeResources/font/poppins_light.ttf
Binary file not shown.
Binary file added
BIN
+153 KB
core/designsystem/src/commonMain/composeResources/font/poppins_medium.ttf
Binary file not shown.
Binary file added
BIN
+155 KB
core/designsystem/src/commonMain/composeResources/font/poppins_regular.ttf
Binary file not shown.
Binary file added
BIN
+152 KB
core/designsystem/src/commonMain/composeResources/font/poppins_semi_bold.ttf
Binary file not shown.
Binary file added
BIN
+158 KB
core/designsystem/src/commonMain/composeResources/font/poppins_thin.ttf
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.