Setup Showkase and add some Preview. WIP
This commit is contained in:
parent
073cd7fd03
commit
6392c57fce
21 changed files with 126 additions and 27 deletions
|
|
@ -1,8 +1,11 @@
|
|||
package io.element.android.x.designsystem
|
||||
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import com.airbnb.android.showkase.annotation.ShowkaseColor
|
||||
|
||||
@ShowkaseColor(name = "LightGrey", group = "Material Design")
|
||||
val LightGrey = Color(0x993C3C43)
|
||||
@ShowkaseColor(name = "DarkGrey", group = "Material Design")
|
||||
val DarkGrey = Color(0x99EBEBF5)
|
||||
|
||||
val AvatarGradientStart = Color(0xFF4CA1AF)
|
||||
|
|
|
|||
|
|
@ -7,24 +7,31 @@ import androidx.compose.ui.text.font.FontStyle
|
|||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.airbnb.android.showkase.annotation.ShowkaseTypography
|
||||
|
||||
|
||||
@ShowkaseTypography(name = "Body Large", group = "Element")
|
||||
val bodyLarge = TextStyle(
|
||||
fontFamily = FontFamily.Default,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 16.sp,
|
||||
lineHeight = 24.sp,
|
||||
letterSpacing = 0.5.sp
|
||||
)
|
||||
|
||||
@ShowkaseTypography(name = "Headline Small", group = "Element")
|
||||
val headlineSmall = TextStyle(
|
||||
fontFamily = FontFamily.Default,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 32.sp,
|
||||
lineHeight = 24.sp,
|
||||
letterSpacing = 0.5.sp
|
||||
)
|
||||
|
||||
// Set of Material typography styles to start with
|
||||
val Typography = Typography(
|
||||
|
||||
bodyLarge = TextStyle(
|
||||
fontFamily = FontFamily.Default,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 16.sp,
|
||||
lineHeight = 24.sp,
|
||||
letterSpacing = 0.5.sp
|
||||
),
|
||||
headlineSmall = TextStyle(
|
||||
fontFamily = FontFamily.Default,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 32.sp,
|
||||
lineHeight = 24.sp,
|
||||
letterSpacing = 0.5.sp
|
||||
),
|
||||
bodyLarge = bodyLarge,
|
||||
headlineSmall = headlineSmall,
|
||||
/* Other default text styles to override
|
||||
titleLarge = TextStyle(
|
||||
fontFamily = FontFamily.Default,
|
||||
|
|
|
|||
|
|
@ -51,6 +51,6 @@ fun ProgressDialog(text: String? = null, onDismiss: () -> Unit = {}) {
|
|||
|
||||
@Composable
|
||||
@Preview
|
||||
private fun ProgressDialogPreview() {
|
||||
fun ProgressDialogPreview() {
|
||||
ProgressDialog("test dialog content")
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ fun ConfirmationDialog(
|
|||
|
||||
@Composable
|
||||
@Preview
|
||||
private fun ConfirmationDialogPreview() {
|
||||
fun ConfirmationDialogPreview() {
|
||||
ConfirmationDialog(
|
||||
isDisplayed = remember { mutableStateOf(true) },
|
||||
title = "Title",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue