Merge pull request #1760 from Stillswarm/Stillswarm-patch-1

Use TextButton instead of Button with Clickable in Settings Dialog
pull/1837/head
Don Turner 9 months ago committed by GitHub
commit b950fe8cfb

@ -20,7 +20,6 @@ package com.google.samples.apps.nowinandroid.feature.settings
import android.content.Intent import android.content.Intent
import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope import androidx.compose.foundation.layout.ColumnScope
@ -141,14 +140,16 @@ fun SettingsDialog(
TrackScreenViewEvent(screenName = "Settings") TrackScreenViewEvent(screenName = "Settings")
}, },
confirmButton = { confirmButton = {
NiaTextButton(
onClick = onDismiss,
modifier = Modifier.padding(horizontal = 8.dp),
) {
Text( Text(
text = stringResource(string.feature_settings_dismiss_dialog_button_text), text = stringResource(string.feature_settings_dismiss_dialog_button_text),
style = MaterialTheme.typography.labelLarge, style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.primary, color = MaterialTheme.colorScheme.primary,
modifier = Modifier
.padding(horizontal = 8.dp)
.clickable { onDismiss() },
) )
}
}, },
) )
} }

Loading…
Cancel
Save