Do not use theme in the Preview, it breaks the screenshots building.
This commit is contained in:
parent
a4bed29a93
commit
4732630d57
9 changed files with 45 additions and 89 deletions
|
|
@ -33,7 +33,6 @@ import androidx.compose.ui.text.style.TextOverflow
|
|||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import io.element.android.x.designsystem.ElementXTheme
|
||||
import io.element.android.x.designsystem.components.avatar.Avatar
|
||||
import io.element.android.x.designsystem.components.avatar.AvatarData
|
||||
import io.element.android.x.designsystem.components.avatar.AvatarSize
|
||||
|
|
@ -84,29 +83,25 @@ fun MatrixUserHeader(
|
|||
@Preview
|
||||
@Composable
|
||||
fun MatrixUserHeaderPreview() {
|
||||
ElementXTheme {
|
||||
MatrixUserHeader(
|
||||
MatrixUser(
|
||||
id = UserId("@alice:server.org"),
|
||||
username = "Alice",
|
||||
avatarUrl = null,
|
||||
avatarData = AvatarData("Alice")
|
||||
)
|
||||
MatrixUserHeader(
|
||||
MatrixUser(
|
||||
id = UserId("@alice:server.org"),
|
||||
username = "Alice",
|
||||
avatarUrl = null,
|
||||
avatarData = AvatarData("Alice")
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
fun MatrixUserHeaderNoUsernamePreview() {
|
||||
ElementXTheme {
|
||||
MatrixUserHeader(
|
||||
MatrixUser(
|
||||
id = UserId("@alice:server.org"),
|
||||
username = null,
|
||||
avatarUrl = null,
|
||||
avatarData = AvatarData("Alice")
|
||||
)
|
||||
MatrixUserHeader(
|
||||
MatrixUser(
|
||||
id = UserId("@alice:server.org"),
|
||||
username = null,
|
||||
avatarUrl = null,
|
||||
avatarData = AvatarData("Alice")
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ import androidx.compose.ui.text.style.TextOverflow
|
|||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import io.element.android.x.designsystem.ElementXTheme
|
||||
import io.element.android.x.designsystem.components.avatar.Avatar
|
||||
import io.element.android.x.designsystem.components.avatar.AvatarData
|
||||
import io.element.android.x.matrix.core.UserId
|
||||
|
|
@ -88,14 +87,12 @@ fun MatrixUserRow(
|
|||
@Preview
|
||||
@Composable
|
||||
fun MatrixUserRowPreview() {
|
||||
ElementXTheme {
|
||||
MatrixUserRow(
|
||||
MatrixUser(
|
||||
id = UserId("@alice:server.org"),
|
||||
username = "Alice",
|
||||
avatarUrl = null,
|
||||
avatarData = AvatarData("Alice")
|
||||
)
|
||||
MatrixUserRow(
|
||||
MatrixUser(
|
||||
id = UserId("@alice:server.org"),
|
||||
username = "Alice",
|
||||
avatarUrl = null,
|
||||
avatarData = AvatarData("Alice")
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue