mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
feat: Add VisualDensity.DENSE to MessageBox
Signed-off-by: Myzel394 <50424412+Myzel394@users.noreply.github.com>
This commit is contained in:
parent
6687b173a5
commit
552acdacf0
@ -68,15 +68,15 @@ fun MessageBox(
|
|||||||
.clip(MaterialTheme.shapes.medium)
|
.clip(MaterialTheme.shapes.medium)
|
||||||
.background(backgroundColor)
|
.background(backgroundColor)
|
||||||
.let {
|
.let {
|
||||||
if (density == VisualDensity.COMFORTABLE) {
|
when (density) {
|
||||||
it.padding(horizontal = 8.dp, vertical = 16.dp)
|
VisualDensity.COMFORTABLE -> it.padding(horizontal = 8.dp, vertical = 16.dp)
|
||||||
} else {
|
VisualDensity.DENSE -> it.padding(8.dp)
|
||||||
it.padding(8.dp)
|
VisualDensity.COMPACT -> it.padding(8.dp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.then(modifier)
|
.then(modifier)
|
||||||
) {
|
) {
|
||||||
if (density == VisualDensity.COMFORTABLE) {
|
if (density == VisualDensity.COMFORTABLE || density == VisualDensity.DENSE) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = when (type) {
|
imageVector = when (type) {
|
||||||
MessageType.ERROR -> Icons.Default.Error
|
MessageType.ERROR -> Icons.Default.Error
|
||||||
@ -121,4 +121,5 @@ enum class MessageType {
|
|||||||
enum class VisualDensity {
|
enum class VisualDensity {
|
||||||
COMPACT,
|
COMPACT,
|
||||||
COMFORTABLE,
|
COMFORTABLE,
|
||||||
|
DENSE,
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user