Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ fun TransactionDetailsContent(
CodeButton(
modifier = Modifier.fillMaxWidth(),
text = stringResource(R.string.action_txnDetails_viewInChat),
buttonState = ButtonState.Filled10,
buttonState = ButtonState.Filled05,
// [DetailsCard]'s radius, not CodeButton's default 8dp — the fill alone is
// not enough to read as one more card if the corners disagree.
shape = CodeTheme.shapes.extraSmall,
onClick = onViewInChat,
)
}
Expand Down
12 changes: 12 additions & 0 deletions ui/components/src/main/kotlin/com/getcode/ui/theme/CodeButton.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ import com.getcode.theme.Black50
import com.getcode.theme.CodeTheme
import com.getcode.theme.Transparent
import com.getcode.theme.White
import com.getcode.theme.White05
import com.getcode.theme.White10
import com.getcode.theme.White20
import com.getcode.theme.White50
Expand All @@ -76,6 +77,7 @@ enum class ButtonState {
Filled50,
Filled20,
Filled10,
Filled05,
BgBlur20,
Subtle,
;
Expand All @@ -89,6 +91,7 @@ enum class ButtonState {
Filled50 -> White50
Filled20 -> White20
Filled10 -> White10
Filled05 -> White05
Subtle -> White
BgBlur20 -> White20
}
Expand Down Expand Up @@ -134,6 +137,15 @@ enum class ButtonState {
contentColor = textColor.takeOrElse { White },
)

// The card fill, for a button meant to read as one more card in a stack rather than
// as a control sitting on top of them.
Filled05 ->
ButtonDefaults.outlinedButtonColors(
backgroundColor = White05,
disabledContentColor = White50,
contentColor = textColor.takeOrElse { White },
)

Subtle ->
ButtonDefaults.outlinedButtonColors(
backgroundColor = Transparent,
Expand Down
Loading