change(design) : use ElementTheme.typography.fontBodyLgMedium for all button text.
This commit is contained in:
parent
c2afc23cd0
commit
818de2a134
1 changed files with 1 additions and 10 deletions
|
|
@ -27,7 +27,6 @@ import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material3.ButtonColors
|
import androidx.compose.material3.ButtonColors
|
||||||
import androidx.compose.material3.ButtonDefaults
|
import androidx.compose.material3.ButtonDefaults
|
||||||
import androidx.compose.material3.LocalContentColor
|
import androidx.compose.material3.LocalContentColor
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.Immutable
|
import androidx.compose.runtime.Immutable
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
|
|
@ -202,14 +201,6 @@ private fun ButtonInternal(
|
||||||
ButtonStyle.Text -> null
|
ButtonStyle.Text -> null
|
||||||
}
|
}
|
||||||
|
|
||||||
val textStyle = when (size) {
|
|
||||||
ButtonSize.Small,
|
|
||||||
ButtonSize.Medium,
|
|
||||||
ButtonSize.MediumLowPadding -> MaterialTheme.typography.labelLarge
|
|
||||||
ButtonSize.Large,
|
|
||||||
ButtonSize.LargeLowPadding -> ElementTheme.typography.fontBodyLgMedium
|
|
||||||
}
|
|
||||||
|
|
||||||
androidx.compose.material3.Button(
|
androidx.compose.material3.Button(
|
||||||
onClick = {
|
onClick = {
|
||||||
if (!showProgress) {
|
if (!showProgress) {
|
||||||
|
|
@ -248,7 +239,7 @@ private fun ButtonInternal(
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = text,
|
text = text,
|
||||||
style = textStyle,
|
style = ElementTheme.typography.fontBodyLgMedium,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue