Remove slim outline color

This commit is contained in:
Andrew 2024-06-17 13:58:52 +09:30
parent a2cce441a8
commit 3a75f2a303
2 changed files with 7 additions and 7 deletions

View File

@ -116,8 +116,6 @@ data class OceanLight(override val primary: Color = primaryBlue): Colors {
override val qrCodeBackground = backgroundSecondary override val qrCodeBackground = backgroundSecondary
} }
val Colors.slimOutlineButton: Color get() = text
@Composable @Composable
fun Colors(name: String, colors: List<Color>) { fun Colors(name: String, colors: List<Color>) {
Column { Column {

View File

@ -163,21 +163,21 @@ fun Button(
Button(text, onClick, LocalColors.current.primary, ButtonType.Outline, modifier, enabled) Button(text, onClick, LocalColors.current.primary, ButtonType.Outline, modifier, enabled)
} }
@Composable fun SlimOutlineButton(onClick: () -> Unit, modifier: Modifier = Modifier, color: Color = LocalColors.current.slimOutlineButton, enabled: Boolean = true, content: @Composable () -> Unit) { @Composable fun SlimOutlineButton(onClick: () -> Unit, modifier: Modifier = Modifier, color: Color = LocalColors.current.text, enabled: Boolean = true, content: @Composable () -> Unit) {
Button(onClick, color, ButtonType.Outline, modifier, enabled, ButtonSize.Slim) { content() } Button(onClick, color, ButtonType.Outline, modifier, enabled, ButtonSize.Slim) { content() }
} }
/** /**
* Courtesy [SlimOutlineButton] implementation for buttons that just display text. * Courtesy [SlimOutlineButton] implementation for buttons that just display text.
*/ */
@Composable fun SlimOutlineButton(text: String, modifier: Modifier = Modifier, color: Color = LocalColors.current.slimOutlineButton, enabled: Boolean = true, onClick: () -> Unit) { @Composable fun SlimOutlineButton(text: String, modifier: Modifier = Modifier, color: Color = LocalColors.current.text, enabled: Boolean = true, onClick: () -> Unit) {
Button(text, onClick, color, ButtonType.Outline, modifier, enabled, ButtonSize.Slim) Button(text, onClick, color, ButtonType.Outline, modifier, enabled, ButtonSize.Slim)
} }
@Composable @Composable
fun SlimOutlineCopyButton( fun SlimOutlineCopyButton(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,
color: Color = LocalColors.current.slimOutlineButton, color: Color = LocalColors.current.text,
onClick: () -> Unit onClick: () -> Unit
) { ) {
OutlineCopyButton(modifier, ButtonSize.Slim, color, onClick) OutlineCopyButton(modifier, ButtonSize.Slim, color, onClick)
@ -384,8 +384,10 @@ private fun VariousButtons(
verticalArrangement = Arrangement.spacedBy(8.dp) verticalArrangement = Arrangement.spacedBy(8.dp)
) { ) {
PrimaryFillButton("Primary Fill") {} PrimaryFillButton("Primary Fill") {}
OutlineButton(text = "Outline Button") {} OutlineButton("Outline Button") {}
SlimOutlineButton(text = "Slim Outline") {} SlimOutlineButton("Slim Outline") {}
SlimOutlineButton("Slim Primary", color = LocalColors.current.buttonOutline) {}
SlimOutlineButton("Slim Danger", color = LocalColors.current.danger) {}
SlimOutlineCopyButton {} SlimOutlineCopyButton {}
} }
} }