Skip to content

Commit

Permalink
Merge pull request #50 from Team-Ampersand/feature/49_gymi_notice_ite…
Browse files Browse the repository at this point in the history
…m_dark_theme_setting

🔀 :: (#49) gymi notice item dark theme setting
  • Loading branch information
Hyeonseo4799 authored Aug 24, 2023
2 parents db9f40f + 2f75791 commit 16847f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,21 @@ fun GYMINoticeItem(
Row {
Text(
text = title,
style = GYMITheme.typography.h5
style = GYMITheme.typography.h5,
color = GYMITheme.colors.bw
)
Spacer(modifier = Modifier.weight(1f))
Text(
text = date,
style = GYMITheme.typography.body3
style = GYMITheme.typography.body3,
color = GYMITheme.colors.bw
)
}
Spacer(modifier = Modifier.height(14.dp))
Text(
text = content,
style = GYMITheme.typography.subtitle4
style = GYMITheme.typography.subtitle4,
color = GYMITheme.colors.bw
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.mpersand.gymi_components.theme

import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.getValue
Expand Down Expand Up @@ -59,7 +60,7 @@ private fun GYMIThemeLocalProvider(
}

private val Theme.colors: GYMIColor
get() = when(this) {
get() = when (this) {
Theme.DARK -> GYMIDarkColors
Theme.LIGHT -> GYMILightColors
}
Expand All @@ -86,6 +87,8 @@ fun GYMITheme(
typography: GYMITypography = GYMITheme.typography,
content: @Composable () -> Unit
) {
GYMITheme.gymiTheme = if (isSystemInDarkTheme()) Theme.DARK else Theme.LIGHT

GYMIThemeLocalProvider(
colors = gymiTheme.colors,
typography = typography,
Expand Down

0 comments on commit 16847f3

Please sign in to comment.