Skip to content

Commit

Permalink
Make empty states scrollable if there's not enough space
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX committed Nov 7, 2024
1 parent 88c597c commit 760e35e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import androidx.annotation.StringRes
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
Expand Down Expand Up @@ -51,7 +53,9 @@ fun EmptyState(
modifier: Modifier = Modifier,
) {
Box(
modifier = Modifier.fillMaxSize(),
modifier = Modifier
.fillMaxSize()
.verticalScroll(rememberScrollState()),
contentAlignment = Alignment.Center,
) {
IllustratedMessageBlock(
Expand Down

0 comments on commit 760e35e

Please sign in to comment.