ElementTheme + MaterialTheme3
This commit is contained in:
parent
1f44550624
commit
decd3a9585
52 changed files with 202 additions and 446 deletions
|
|
@ -24,6 +24,7 @@ import androidx.activity.OnBackPressedDispatcherOwner
|
|||
import androidx.activity.compose.LocalOnBackPressedDispatcherOwner
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalConfiguration
|
||||
|
|
@ -74,7 +75,6 @@ class ScreenshotTest {
|
|||
@TestParameter(valuesProvider = PreviewProvider::class) componentTestPreview: TestPreview,
|
||||
@TestParameter baseDeviceConfig: BaseDeviceConfig,
|
||||
@TestParameter(value = ["1.0"/*, "1.5"*/]) fontScale: Float,
|
||||
@TestParameter(value = ["light", "dark"]) theme: String,
|
||||
@TestParameter(value = ["en" /*"fr", "de", "ru"*/]) localeStr: String,
|
||||
) {
|
||||
paparazzi.unsafeUpdateConfig(
|
||||
|
|
@ -100,8 +100,8 @@ class ScreenshotTest {
|
|||
override fun getOnBackPressedDispatcher() = OnBackPressedDispatcher()
|
||||
}
|
||||
) {
|
||||
ElementTheme(darkTheme = (theme == "dark")) {
|
||||
Box(modifier = Modifier.background(ElementTheme.colors.background)) {
|
||||
ElementTheme {
|
||||
Box(modifier = Modifier.background(MaterialTheme.colorScheme.background)) {
|
||||
componentTestPreview.Content()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ package io.element.android.tests.uitests
|
|||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.text.BasicText
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import com.airbnb.android.showkase.models.ShowkaseBrowserTypography
|
||||
import com.airbnb.android.showkase.ui.padding4x
|
||||
import io.element.android.libraries.designsystem.theme.ElementTheme
|
||||
import java.util.Locale
|
||||
|
||||
class TypographyTestPreview(
|
||||
|
|
@ -39,7 +39,7 @@ class TypographyTestPreview(
|
|||
.fillMaxWidth()
|
||||
.padding(padding4x),
|
||||
style = showkaseBrowserTypography.textStyle.copy(
|
||||
color = ElementTheme.colors.onBackground
|
||||
color = MaterialTheme.colorScheme.onBackground
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue