Skip to content

Commit

Permalink
Add shimmer color to palette, remove ui_theme dependency from shimmer…
Browse files Browse the repository at this point in the history
… module
  • Loading branch information
tonykolomeytsev committed Oct 2, 2023
1 parent 6d4d8f3 commit 6535d8a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private fun ShimmersScreen() {

@Composable
private fun ShimmerItem() {
val color = MpeixTheme.palette.surfacePlus3
val color = MpeixTheme.palette.shimmer
val radius = 4.dp
Row(
Modifier
Expand Down
4 changes: 0 additions & 4 deletions modules/ui/shimmer/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
plugins {
id("mpeix.android.ui")
}

dependencies {
implementation(project(":ui_theme"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal object ShimmerTokens {
val Width: Dp = 400.dp
val AnimationSpec: AnimationSpec<Float> = infiniteRepeatable(
animation = tween(
durationMillis = 500,
durationMillis = 700,
easing = LinearEasing,
delayMillis = 500,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ object MpeixColors {
val Neutral95 = Color(0xFFF0F2F5)
val Neutral93 = Color(0xFFE3E7ED)
val Neutral90 = Color(0xFFE0E4EB)
val Neutral85 = Color(0xFFD1D7E0)
val Neutral80 = Color(0xFFC2CAD6)
val Neutral70 = Color(0xFFA3AFC2)
val Neutral60 = Color(0xFF8494AE)
Expand All @@ -63,6 +64,7 @@ class MpeixPalette internal constructor(
val surfacePlus1: Color,
val surfacePlus2: Color,
val surfacePlus3: Color,
val shimmer: Color,
val primaryContainer: Color,
val secondaryContainer: Color,
val content: Color,
Expand All @@ -84,6 +86,7 @@ val LightMpeixPalette = MpeixPalette(
surfacePlus1 = MpeixColors.Neutral98,
surfacePlus2 = MpeixColors.Neutral95,
surfacePlus3 = MpeixColors.Neutral93,
shimmer = MpeixColors.Neutral85,
primaryContainer = MpeixColors.Primary90,
secondaryContainer = MpeixColors.Secondary90,
content = MpeixColors.Neutral20,
Expand All @@ -102,6 +105,7 @@ val DarkMpeixPalette = MpeixPalette(
surfacePlus1 = MpeixColors.Neutral25,
surfacePlus2 = MpeixColors.Neutral30,
surfacePlus3 = MpeixColors.Neutral35,
shimmer = MpeixColors.Neutral25,
primaryContainer = MpeixColors.Primary50,
secondaryContainer = MpeixColors.Secondary30,
content = MpeixColors.Neutral90,
Expand Down Expand Up @@ -164,6 +168,7 @@ private fun PalettePreview(
colorItem("Surface + 1", palette.surfacePlus1, palette.content)
colorItem("Surface + 2", palette.surfacePlus2, palette.content)
colorItem("Surface + 3", palette.surfacePlus3, palette.content)
colorItem("Shimmer", palette.surfacePlus3, palette.content)
}
Row(Modifier.padding(bottom = 12.dp)) {
colorItem("Primary", palette.primary, palette.contentAccent)
Expand Down

0 comments on commit 6535d8a

Please sign in to comment.