Skip to content

Commit

Permalink
refactor: Run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
Ushie committed Nov 15, 2023
1 parent 6389d52 commit 24073a8
Showing 1 changed file with 22 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fun AlertDialogExtended(
color = containerColor,
tonalElevation = tonalElevation,
) {
Column (modifier = Modifier.padding(vertical = 24.dp)) {
Column(modifier = Modifier.padding(vertical = 24.dp)) {
Column(
modifier = Modifier.padding(horizontal = 24.dp)
) {
Expand All @@ -69,7 +69,10 @@ fun AlertDialogExtended(
}
}
title?.let {
ContentStyle(color = titleContentColor, textStyle = MaterialTheme.typography.headlineSmall) {
ContentStyle(
color = titleContentColor,
textStyle = MaterialTheme.typography.headlineSmall
) {
Box(
// Align the title to the center when an icon is present.
Modifier
Expand All @@ -88,7 +91,10 @@ fun AlertDialogExtended(
}
}
text?.let {
ContentStyle(color = textContentColor, textStyle = MaterialTheme.typography.bodyMedium) {
ContentStyle(
color = textContentColor,
textStyle = MaterialTheme.typography.bodyMedium
) {
Box(
Modifier
.weight(weight = 1f, fill = false)
Expand All @@ -104,10 +110,16 @@ fun AlertDialogExtended(
modifier = Modifier
.padding(horizontal = 24.dp)
) {
ContentStyle(color = MaterialTheme.colorScheme.primary,textStyle = MaterialTheme.typography.labelLarge) {
ContentStyle(
color = MaterialTheme.colorScheme.primary,
textStyle = MaterialTheme.typography.labelLarge
) {
FlowRow(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.spacedBy(12.dp, if (tertiaryButton != null) Alignment.Start else Alignment.End),
horizontalArrangement = Arrangement.spacedBy(
12.dp,
if (tertiaryButton != null) Alignment.Start else Alignment.End
),
verticalArrangement = Arrangement.spacedBy(8.dp)
) {
tertiaryButton?.let {
Expand All @@ -125,7 +137,11 @@ fun AlertDialogExtended(
}

@Composable
private fun ContentStyle(color: Color? = null, textStyle: TextStyle? = null, content: @Composable () -> Unit) {
private fun ContentStyle(
color: Color? = null,
textStyle: TextStyle? = null,
content: @Composable () -> Unit
) {
val contentColor = color ?: LocalContentColor.current
val finalTextStyle = textStyle ?: LocalTextStyle.current

Expand Down

0 comments on commit 24073a8

Please sign in to comment.