Skip to content

Commit e861bcf

Browse files
authored
Merge pull request #1760 from Stillswarm/Stillswarm-patch-1
Use TextButton instead of Button with Clickable in Settings Dialog
2 parents c3ac329 + 9a183d5 commit e861bcf

File tree

1 file changed

+10
-9
lines changed
  • feature/settings/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/settings

1 file changed

+10
-9
lines changed

feature/settings/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/settings/SettingsDialog.kt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ package com.google.samples.apps.nowinandroid.feature.settings
2020

2121
import android.content.Intent
2222
import androidx.compose.animation.AnimatedVisibility
23-
import androidx.compose.foundation.clickable
2423
import androidx.compose.foundation.layout.Arrangement
2524
import androidx.compose.foundation.layout.Column
2625
import androidx.compose.foundation.layout.ColumnScope
@@ -141,14 +140,16 @@ fun SettingsDialog(
141140
TrackScreenViewEvent(screenName = "Settings")
142141
},
143142
confirmButton = {
144-
Text(
145-
text = stringResource(string.feature_settings_dismiss_dialog_button_text),
146-
style = MaterialTheme.typography.labelLarge,
147-
color = MaterialTheme.colorScheme.primary,
148-
modifier = Modifier
149-
.padding(horizontal = 8.dp)
150-
.clickable { onDismiss() },
151-
)
143+
NiaTextButton(
144+
onClick = onDismiss,
145+
modifier = Modifier.padding(horizontal = 8.dp),
146+
) {
147+
Text(
148+
text = stringResource(string.feature_settings_dismiss_dialog_button_text),
149+
style = MaterialTheme.typography.labelLarge,
150+
color = MaterialTheme.colorScheme.primary,
151+
)
152+
}
152153
},
153154
)
154155
}

0 commit comments

Comments
 (0)