Skip to content

Commit 70bab19

Browse files
rafaeltonholodani-zilla
authored andcommitted
feat(design-system): add UsingBrandTypography composable helper function
1 parent f91f7f2 commit 70bab19

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

core/common/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ kotlin {
2424
implementation(projects.core.logging.implLegacy)
2525
implementation(projects.core.logging.api)
2626
implementation(projects.core.logging.implFile)
27+
implementation(libs.koin.compose)
2728
}
2829
getByName("commonJvmTest") {
2930
dependencies {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package net.thunderbird.core.common.provider
2+
3+
import androidx.compose.runtime.Composable
4+
import androidx.compose.runtime.Stable
5+
import org.koin.compose.koinInject
6+
7+
@Stable
8+
fun interface BrandTypographyProvider {
9+
@Composable
10+
fun UsingTypography(content: @Composable () -> Unit)
11+
}
12+
13+
@Composable
14+
fun UsingBrandTypography(
15+
provider: BrandTypographyProvider = koinInject(),
16+
content: @Composable () -> Unit,
17+
) = provider.UsingTypography(content)

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ junit = { module = "junit:junit", version.ref = "junit" }
255255
jutf7 = { module = "com.beetstra.jutf7:jutf7", version.ref = "jutf7" }
256256
jzlib = { module = "com.jcraft:jzlib", version.ref = "jzlib" }
257257
koin-bom = { module = "io.insert-koin:koin-bom", version.ref = "koinBom" }
258+
koin-compose = { module = "io.insert-koin:koin-compose" }
258259
koin-core = { module = "io.insert-koin:koin-core" }
259260
koin-core-viewmodel = { module = "io.insert-koin:koin-core-viewmodel" }
260261
koin-compose-viewmodel = { module = "io.insert-koin:koin-compose-viewmodel" }

0 commit comments

Comments
 (0)