-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from everymeals/feature/review_star_view
[Feature/review_star_view]: 리뷰 상세 기능
- Loading branch information
Showing
13 changed files
with
567 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
presentation/src/main/java/com/everymeal/presentation/components/EveryMealDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package com.everymeal.presentation.components | ||
|
||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material3.Surface | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.dp | ||
import androidx.compose.ui.window.Dialog | ||
import com.everymeal.presentation.ui.theme.EveryMealTypography | ||
import com.everymeal.presentation.ui.theme.Grey7 | ||
import com.everymeal.presentation.ui.theme.MONO_BLACK | ||
|
||
@Composable | ||
fun EveryMealDialog( | ||
modifier: Modifier = Modifier, | ||
title: String, | ||
message: String, | ||
confirmButtonText: String, | ||
dismissButtonText: String, | ||
onDismissRequest: () -> Unit, | ||
onConfirmClick: () -> Unit, | ||
onDisMissClicked: () -> Unit | ||
) { | ||
Dialog( | ||
onDismissRequest = onDismissRequest, | ||
content = { | ||
Surface( | ||
modifier = modifier, | ||
shape = RoundedCornerShape(10.dp), | ||
) { | ||
Column( | ||
modifier = Modifier | ||
.padding(top = 8.dp) | ||
.padding(16.dp) | ||
) { | ||
Text( | ||
text = title, | ||
style = EveryMealTypography.titleLarge, | ||
color = MONO_BLACK | ||
) | ||
Spacer(modifier = Modifier.height(4.dp)) | ||
Text( | ||
text = message, | ||
style = EveryMealTypography.bodyMedium, | ||
color = Grey7 | ||
) | ||
Spacer(modifier = Modifier.height(24.dp)) | ||
Row { | ||
EveryMealGreyButton( | ||
modifier = Modifier | ||
.weight(1f) | ||
.padding(end = 4.dp), | ||
onClick = onDisMissClicked, | ||
buttonText = dismissButtonText | ||
) | ||
EveryMealRedButton( | ||
modifier = Modifier | ||
.weight(1f) | ||
.padding(start = 4.dp), | ||
onClick = onConfirmClick, | ||
buttonText = confirmButtonText | ||
) | ||
} | ||
} | ||
} | ||
} | ||
) | ||
} |
48 changes: 48 additions & 0 deletions
48
presentation/src/main/java/com/everymeal/presentation/components/EveryMealGreyButton.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.everymeal.presentation.components | ||
|
||
import androidx.compose.foundation.layout.PaddingValues | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material3.Button | ||
import androidx.compose.material3.ButtonDefaults | ||
import androidx.compose.material3.Text | ||
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.font.FontWeight | ||
import androidx.compose.ui.unit.dp | ||
import androidx.compose.ui.unit.sp | ||
import com.everymeal.presentation.ui.theme.Gray200 | ||
import com.everymeal.presentation.ui.theme.Grey7 | ||
import com.everymeal.presentation.ui.theme.Main100 | ||
|
||
@Composable | ||
fun EveryMealGreyButton( | ||
modifier: Modifier = Modifier, | ||
buttonText: String, | ||
onClick: () -> Unit = {} | ||
) { | ||
Button( | ||
modifier = modifier, | ||
colors = ButtonDefaults.buttonColors( | ||
containerColor = Gray200, | ||
contentColor = Grey7, | ||
disabledContainerColor = Gray200, | ||
disabledContentColor = Color.White, | ||
), | ||
onClick = onClick, | ||
shape = RoundedCornerShape(12.dp), | ||
contentPadding = PaddingValues(16.dp), | ||
content = { | ||
Text( | ||
text = buttonText, | ||
style = TextStyle( | ||
fontSize = 16.sp, | ||
fontWeight = FontWeight(500), | ||
color = Grey7, | ||
) | ||
) | ||
} | ||
) | ||
} |
49 changes: 49 additions & 0 deletions
49
presentation/src/main/java/com/everymeal/presentation/components/EveryMealRedButton.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.everymeal.presentation.components | ||
|
||
import androidx.compose.foundation.layout.PaddingValues | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material3.Button | ||
import androidx.compose.material3.ButtonDefaults | ||
import androidx.compose.material3.Text | ||
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.font.FontWeight | ||
import androidx.compose.ui.unit.dp | ||
import androidx.compose.ui.unit.sp | ||
import com.everymeal.presentation.ui.theme.Gray200 | ||
import com.everymeal.presentation.ui.theme.Main100 | ||
|
||
@Composable | ||
fun EveryMealRedButton( | ||
modifier: Modifier = Modifier, | ||
buttonText: String, | ||
enabled: Boolean = true, | ||
onClick: () -> Unit = {} | ||
) { | ||
Button( | ||
modifier = modifier, | ||
colors = ButtonDefaults.buttonColors( | ||
containerColor = Main100, | ||
contentColor = Color.White, | ||
disabledContainerColor = Gray200, | ||
disabledContentColor = Color.White, | ||
), | ||
enabled = enabled, | ||
onClick = onClick, | ||
shape = RoundedCornerShape(12.dp), | ||
contentPadding = PaddingValues(16.dp), | ||
content = { | ||
Text( | ||
text = buttonText, | ||
style = TextStyle( | ||
fontSize = 16.sp, | ||
fontWeight = FontWeight(500), | ||
color = Color.White, | ||
) | ||
) | ||
} | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.