change (room avatar) : add preview for TombstonedRoomAvatar
This commit is contained in:
parent
f3614ab67e
commit
da371797d3
1 changed files with 13 additions and 0 deletions
|
|
@ -12,8 +12,12 @@ import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.clip
|
import androidx.compose.ui.draw.clip
|
||||||
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
import io.element.android.compound.theme.AvatarColors
|
import io.element.android.compound.theme.AvatarColors
|
||||||
import io.element.android.compound.theme.ElementTheme
|
import io.element.android.compound.theme.ElementTheme
|
||||||
|
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||||
|
import io.element.android.libraries.designsystem.preview.PreviewGroup
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun TombstonedRoomAvatar(
|
fun TombstonedRoomAvatar(
|
||||||
|
|
@ -34,3 +38,12 @@ fun TombstonedRoomAvatar(
|
||||||
contentDescription = contentDescription
|
contentDescription = contentDescription
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Preview(group = PreviewGroup.Avatars)
|
||||||
|
@Composable
|
||||||
|
internal fun TombstonedRoomAvatarPreview() = ElementPreview {
|
||||||
|
TombstonedRoomAvatar(
|
||||||
|
size = AvatarSize.RoomListItem,
|
||||||
|
contentDescription = null,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue