Skip to content

Commit

Permalink
Moved header's shape to Shape.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyPouya committed Sep 7, 2024
1 parent 3793068 commit 58fef20
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.MaterialTheme
Expand All @@ -18,6 +17,7 @@ import androidx.compose.ui.tooling.preview.PreviewFontScale
import androidx.compose.ui.tooling.preview.PreviewLightDark
import androidx.compose.ui.tooling.preview.PreviewScreenSizes
import androidx.compose.ui.unit.dp
import com.pouyaheydari.calendar.features.calendar.main.theme.HeaderShape
import com.pouyaheydari.calendar.features.calendar.main.theme.PersianCalendarTheme

@Composable
Expand All @@ -31,12 +31,7 @@ fun HeaderComponent(
modifier = modifier
.fillMaxWidth()
.fillMaxHeight(0.3f),
shape = RoundedCornerShape(
topStart = 0.dp,
topEnd = 0.dp,
bottomEnd = 50.dp,
bottomStart = 50.dp
),
shape = HeaderShape,
colors = CardDefaults.cardColors().copy(containerColor = MaterialTheme.colorScheme.primary),
elevation = CardDefaults.cardElevation(defaultElevation = 16.dp)
) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
package com.pouyaheydari.calendar.features.calendar.main.theme

import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.ui.unit.dp

val TodayShape = RoundedCornerShape(15)
val TodayShape = RoundedCornerShape(15)
val HeaderShape = RoundedCornerShape(
topStart = 0.dp,
topEnd = 0.dp,
bottomEnd = 50.dp,
bottomStart = 50.dp
)

0 comments on commit 58fef20

Please sign in to comment.