mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
Remove Button elevation
This commit is contained in:
parent
7826484320
commit
6ea535c9c7
@ -16,7 +16,6 @@ import androidx.compose.foundation.layout.heightIn
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.ButtonColors
|
||||
import androidx.compose.material.ButtonDefaults
|
||||
import androidx.compose.material.ButtonElevation
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.material.TextButton
|
||||
@ -62,7 +61,6 @@ fun Button(
|
||||
modifier: Modifier = Modifier,
|
||||
enabled: Boolean = true,
|
||||
size: ButtonStyle = ButtonStyle.Large,
|
||||
elevation: ButtonElevation? = type.elevation,
|
||||
shape: Shape = MaterialTheme.shapes.small,
|
||||
border: BorderStroke? = type.border(color, enabled),
|
||||
colors: ButtonColors = type.buttonColors(color),
|
||||
@ -75,7 +73,7 @@ fun Button(
|
||||
modifier.heightIn(min = size.minHeight),
|
||||
enabled,
|
||||
interactionSource,
|
||||
elevation,
|
||||
elevation = null,
|
||||
shape,
|
||||
border,
|
||||
colors
|
||||
@ -100,13 +98,12 @@ fun Button(
|
||||
modifier: Modifier = Modifier,
|
||||
enabled: Boolean = true,
|
||||
size: ButtonStyle = ButtonStyle.Large,
|
||||
elevation: ButtonElevation? = type.elevation,
|
||||
shape: Shape = MaterialTheme.shapes.small,
|
||||
border: BorderStroke? = type.border(color, enabled),
|
||||
colors: ButtonColors = type.buttonColors(color),
|
||||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
||||
) {
|
||||
Button(onClick, color, type, modifier, enabled, size, elevation, shape, border, colors, interactionSource) {
|
||||
Button(onClick, color, type, modifier, enabled, size, shape, border, colors, interactionSource) {
|
||||
Text(text)
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ package org.thoughtcrime.securesms.ui.components
|
||||
import androidx.compose.foundation.BorderStroke
|
||||
import androidx.compose.material.ButtonColors
|
||||
import androidx.compose.material.ButtonDefaults
|
||||
import androidx.compose.material.ButtonElevation
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
@ -14,7 +13,6 @@ interface ButtonType {
|
||||
fun border(color: Color, enabled: Boolean): BorderStroke?
|
||||
@Composable
|
||||
fun buttonColors(color: Color): ButtonColors
|
||||
val elevation: ButtonElevation? @Composable get
|
||||
|
||||
object Outline: ButtonType {
|
||||
@Composable
|
||||
@ -27,7 +25,6 @@ interface ButtonType {
|
||||
disabledContentColor = LocalColors.current.disabled,
|
||||
disabledBackgroundColor = Color.Unspecified
|
||||
)
|
||||
override val elevation: ButtonElevation? @Composable get() = null
|
||||
}
|
||||
|
||||
object Fill: ButtonType {
|
||||
@ -40,6 +37,5 @@ interface ButtonType {
|
||||
disabledContentColor = LocalColors.current.disabled,
|
||||
disabledBackgroundColor = Color.Unspecified
|
||||
)
|
||||
override val elevation: ButtonElevation @Composable get() = ButtonDefaults.elevation()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user