Konsist: add test to ensure that functions with @PreviewsDayNight contain ElementTheme composable, and fix existing issues.
This commit is contained in:
parent
6230d9d48b
commit
8ca42d4cfc
5 changed files with 22 additions and 9 deletions
|
|
@ -34,6 +34,7 @@ import androidx.compose.ui.text.input.TextFieldValue
|
|||
import androidx.compose.ui.unit.dp
|
||||
import io.element.android.features.lockscreen.impl.pin.model.PinDigit
|
||||
import io.element.android.features.lockscreen.impl.pin.model.PinEntry
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.designsystem.theme.pinDigitBg
|
||||
import io.element.android.libraries.theme.ElementTheme
|
||||
|
|
@ -107,7 +108,7 @@ private fun PinDigitView(
|
|||
@PreviewsDayNight
|
||||
@Composable
|
||||
internal fun PinEntryTextFieldPreview() {
|
||||
ElementTheme {
|
||||
ElementPreview {
|
||||
PinEntryTextField(
|
||||
pinEntry = PinEntry.empty(4).fillWith("12"),
|
||||
onValueChange = {},
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import androidx.compose.ui.draw.clip
|
|||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import io.element.android.features.messages.impl.R
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.designsystem.utils.CommonDrawables
|
||||
|
|
@ -61,7 +62,7 @@ fun TimelineEncryptedHistoryBannerView(modifier: Modifier = Modifier) {
|
|||
@PreviewsDayNight
|
||||
@Composable
|
||||
internal fun TimelineEncryptedHistoryBannerViewPreview() {
|
||||
ElementTheme {
|
||||
ElementPreview {
|
||||
TimelineEncryptedHistoryBannerView()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue