Skip to content

Commit

Permalink
Merge pull request #102 from eshc123/feature/mod-calender-list
Browse files Browse the repository at this point in the history
[FEATURE] Modified Calendar List (1)
  • Loading branch information
KanuKim97 authored Jul 15, 2024
2 parents aa22165 + f39fe44 commit 12cabfb
Show file tree
Hide file tree
Showing 17 changed files with 717 additions and 350 deletions.
263 changes: 263 additions & 0 deletions .idea/other.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fun GnrNavHost(
onClickUser = {
navController.navigateToLogin()
},
onShowSnackbar = onShowSnackbar
onShowSnackBar = onShowSnackbar
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ object DateUtil {
.format(DateTimeFormatter.ofPattern("MM.dd E", Locale.US)).uppercase()
}

fun getMonthAndDateString(date: String): String {
if (date.isBlank()) return date
return LocalDateTime.parse(date, defaultDateFormat)
.format(DateTimeFormatter.ofPattern("MM.dd"))
}

fun getYearAndMonthAndDateLocalDate(date: String): LocalDate {
if (date.isBlank()) return LocalDate.now()
return LocalDate.parse(date, defaultDateFormat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ package com.eshc.goonersapp.core.designsystem.component

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
Expand All @@ -17,27 +14,23 @@ import com.eshc.goonersapp.core.designsystem.theme.ColorFF000000
import com.eshc.goonersapp.core.designsystem.theme.GnrTypography

@Composable
fun MatchItemResultChip(
fun GnrChip(
result: String,
color: Color,
containerColor: Color,
modifier: Modifier = Modifier
) {
Card(
GnrCard(
modifier = modifier,
shape = RoundedCornerShape(3.dp),
shapes = RoundedCornerShape(3.dp),
colors = CardDefaults.cardColors(
containerColor = color,
containerColor = containerColor,
contentColor = ColorFF000000
)
) {
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
Text(
text = result,
style = GnrTypography.descriptionMedium
)
}
contentAlignment = Alignment.Center,
content = { Text(text = result, style = GnrTypography.descriptionMedium) }
)
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.eshc.goonersapp.core.designsystem.component

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.shape.RoundedCornerShape
Expand All @@ -9,6 +10,7 @@ import androidx.compose.material.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
Expand All @@ -24,7 +26,7 @@ fun GnrTextButton(
containerColor: Color = ColorFF10358A,
contentColor: Color = ColorFFFFFFFF,
round: Dp = 15.dp,
contentPaddingValues : PaddingValues = PaddingValues(vertical = 10.dp,)
contentPaddingValues : PaddingValues = PaddingValues(vertical = 10.dp)
) {
TextButton(
modifier = modifier,
Expand All @@ -43,4 +45,37 @@ fun GnrTextButton(
textAlign = TextAlign.Center
)
}
}

@Composable
fun GnrTextButton(
text: String,
onClick: () -> Unit,
modifier: Modifier = Modifier,
textStyle: TextStyle = GnrTypography.heading2SemiBold,
textAlign: TextAlign = TextAlign.Center,
containerColor: Color = ColorFF10358A,
contentColor: Color = ColorFFFFFFFF,
round: Dp = 15.dp,
borderStroke: BorderStroke? = null,
contentPaddingValues : PaddingValues = PaddingValues(vertical = 10.dp)
) {
TextButton(
modifier = modifier,
onClick = onClick,
colors = ButtonDefaults.textButtonColors(
backgroundColor = containerColor,
contentColor = contentColor
),
shape = RoundedCornerShape(round),
border = borderStroke,
contentPadding = contentPaddingValues
) {
Text(
modifier = Modifier,
text = text,
style = textStyle,
textAlign = textAlign
)
}
}
Loading

0 comments on commit 12cabfb

Please sign in to comment.