Add preview for SunsetPage and fix warnings about Modifiers.
This commit is contained in:
parent
addb0dc3bc
commit
a2a9fda583
2 changed files with 14 additions and 2 deletions
|
|
@ -106,7 +106,6 @@ private fun WaitListContent(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
SunsetPage(
|
SunsetPage(
|
||||||
modifier = modifier,
|
|
||||||
isLoading = state.loginAction !is Async.Success,
|
isLoading = state.loginAction !is Async.Success,
|
||||||
title = title,
|
title = title,
|
||||||
subtitle = subtitle,
|
subtitle = subtitle,
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,8 @@ import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import io.element.android.libraries.designsystem.R
|
import io.element.android.libraries.designsystem.R
|
||||||
|
import io.element.android.libraries.designsystem.preview.DayNightPreviews
|
||||||
|
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||||
import io.element.android.libraries.designsystem.text.withColoredPeriod
|
import io.element.android.libraries.designsystem.text.withColoredPeriod
|
||||||
import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator
|
import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator
|
||||||
import io.element.android.libraries.designsystem.theme.components.Text
|
import io.element.android.libraries.designsystem.theme.components.Text
|
||||||
|
|
@ -59,7 +61,7 @@ fun SunsetPage(
|
||||||
) {
|
) {
|
||||||
SunsetBackground()
|
SunsetBackground()
|
||||||
Box(
|
Box(
|
||||||
modifier = modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.systemBarsPadding()
|
.systemBarsPadding()
|
||||||
.padding(horizontal = 16.dp, vertical = 16.dp)
|
.padding(horizontal = 16.dp, vertical = 16.dp)
|
||||||
|
|
@ -132,3 +134,14 @@ private fun SunsetBackground(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DayNightPreviews
|
||||||
|
@Composable
|
||||||
|
internal fun SunsetPagePreview() = ElementPreview {
|
||||||
|
SunsetPage(
|
||||||
|
isLoading = true,
|
||||||
|
title = "Title with a green period.",
|
||||||
|
subtitle = "Subtitle",
|
||||||
|
overallContent = {}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue