Fix - Invalid parameter name for seed color (#39)
This commit is contained in:
parent
cf30b4f0c3
commit
2c2a764b94
4 changed files with 5 additions and 5 deletions
|
@ -8,7 +8,7 @@ fun mkColorsKt(
|
|||
colors: ColorSettings,
|
||||
): String {
|
||||
val colorList = listOfNotNull(
|
||||
if (colors.primary == null) colors.seed.variable("Seed")
|
||||
if (colors.primary == null) colors.seed.variable("SeedColor")
|
||||
else colors.primary.variable("Primary"),
|
||||
colors.secondary.variable("Secondary"),
|
||||
colors.tertiary.variable("Tertiary"),
|
||||
|
|
|
@ -20,7 +20,7 @@ fun mkThemeKt(
|
|||
contrast,
|
||||
settings.isAmoled.parameter("isAmoled"),
|
||||
settings.isExtendedFidelity.parameter("extendedFidelity"),
|
||||
if (settings.colors.primary == null) settings.colors.seed.parameter("Seed")
|
||||
if (settings.colors.primary == null) settings.colors.seed.parameter("SeedColor")
|
||||
else settings.colors.primary.parameter("Primary"),
|
||||
settings.colors.secondary.parameter("Secondary"),
|
||||
settings.colors.tertiary.parameter("Tertiary"),
|
||||
|
|
|
@ -49,7 +49,7 @@ class MKColorsTest {
|
|||
|
||||
val result = mkColorsKt("com.example", colorSettings)
|
||||
|
||||
assertTrue(result.contains("val Seed = Color(0xFF000000)"))
|
||||
assertTrue(result.contains("val SeedColor = Color(0xFF000000)"))
|
||||
assertFalse(result.contains("val Primary = "))
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ class MKColorsTest {
|
|||
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
val Seed = Color(0xFF000000)
|
||||
val SeedColor = Color(0xFF000000)
|
||||
""".trimIndent()
|
||||
|
||||
assertEquals(expectedOutput, result)
|
||||
|
|
|
@ -114,7 +114,7 @@ fun MyTheme(
|
|||
contrastLevel = 1.0,
|
||||
isAmoled = true,
|
||||
extendedFidelity = true,
|
||||
seed = Seed,
|
||||
seedColor = SeedColor,
|
||||
)
|
||||
|
||||
DynamicMaterialTheme(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue