Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Modified Calendar List #102

Merged
merged 7 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading