mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Add preview for SunsetPage and fix warnings about Modifiers.
This commit is contained in:
-1
@@ -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,
|
||||||
|
|||||||
+14
-1
@@ -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 = {}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user