mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-18 03:17:03 +05:30
Header: tweak design a bit
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
790e785dd3
commit
ce34b1173d
1 changed files with 7 additions and 3 deletions
|
@ -9,10 +9,10 @@ import androidx.compose.material.MaterialTheme
|
||||||
import androidx.compose.material.Text
|
import androidx.compose.material.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import dev.msfjarvis.lobsters.ui.theme.LobstersTheme
|
import dev.msfjarvis.lobsters.ui.theme.LobstersTheme
|
||||||
import dev.msfjarvis.lobsters.ui.theme.titleColor
|
|
||||||
import java.time.Month
|
import java.time.Month
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import java.time.format.TextStyle as JTextStyle
|
import java.time.format.TextStyle as JTextStyle
|
||||||
|
@ -22,12 +22,16 @@ fun MonthHeader(month: Month) {
|
||||||
Box(
|
Box(
|
||||||
Modifier
|
Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.background(MaterialTheme.colors.background)
|
.background(MaterialTheme.colors.secondary)
|
||||||
.wrapContentHeight()
|
.wrapContentHeight()
|
||||||
|
.padding(4.dp)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = month.getDisplayName(JTextStyle.FULL, Locale.getDefault()),
|
text = month.getDisplayName(JTextStyle.FULL, Locale.getDefault()),
|
||||||
style = MaterialTheme.typography.h4.copy(color = titleColor),
|
style = MaterialTheme.typography.h5.copy(
|
||||||
|
color = MaterialTheme.colors.onSecondary,
|
||||||
|
textAlign = TextAlign.Center,
|
||||||
|
),
|
||||||
modifier = Modifier.padding(horizontal = 12.dp),
|
modifier = Modifier.padding(horizontal = 12.dp),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue