Add color property to Text atoms
This commit is contained in:
parent
dd699d0f65
commit
149a069f6c
14 changed files with 54 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package app.k9mail.ui.catalog.items
|
||||
|
||||
import androidx.compose.foundation.lazy.grid.LazyGridScope
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import app.k9mail.core.ui.compose.designsystem.atom.text.TextBody1
|
||||
import app.k9mail.core.ui.compose.designsystem.atom.text.TextBody2
|
||||
import app.k9mail.core.ui.compose.designsystem.atom.text.TextButton
|
||||
|
@ -30,4 +31,18 @@ fun LazyGridScope.typographyItems() {
|
|||
item { TextButton(text = "Button") }
|
||||
item { TextCaption(text = "Caption") }
|
||||
item { TextOverline(text = "Overline") }
|
||||
sectionSubtitleItem(text = "colored")
|
||||
item { TextHeadline1(text = "Headline1", color = Color.Magenta) }
|
||||
item { TextHeadline2(text = "Headline2", color = Color.Magenta) }
|
||||
item { TextHeadline3(text = "Headline3", color = Color.Magenta) }
|
||||
item { TextHeadline4(text = "Headline4", color = Color.Magenta) }
|
||||
item { TextHeadline5(text = "Headline5", color = Color.Magenta) }
|
||||
item { TextHeadline6(text = "Headline6", color = Color.Magenta) }
|
||||
item { TextSubtitle1(text = "Subtitle1", color = Color.Magenta) }
|
||||
item { TextSubtitle2(text = "Subtitle2", color = Color.Magenta) }
|
||||
item { TextBody1(text = "Body1", color = Color.Magenta) }
|
||||
item { TextBody2(text = "Body2", color = Color.Magenta) }
|
||||
item { TextButton(text = "Button", color = Color.Magenta) }
|
||||
item { TextCaption(text = "Caption", color = Color.Magenta) }
|
||||
item { TextOverline(text = "Overline", color = Color.Magenta) }
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package app.k9mail.core.ui.compose.designsystem.atom.text
|
|||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.PreviewWithThemes
|
||||
|
@ -11,11 +12,13 @@ import androidx.compose.material.Text as MaterialText
|
|||
fun TextBody1(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
) {
|
||||
MaterialText(
|
||||
text = text,
|
||||
style = MainTheme.typography.body1,
|
||||
modifier = modifier,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package app.k9mail.core.ui.compose.designsystem.atom.text
|
|||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.PreviewWithThemes
|
||||
|
@ -11,11 +12,13 @@ import androidx.compose.material.Text as MaterialText
|
|||
fun TextBody2(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
) {
|
||||
MaterialText(
|
||||
text = text,
|
||||
style = MainTheme.typography.body2,
|
||||
modifier = modifier,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package app.k9mail.core.ui.compose.designsystem.atom.text
|
|||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.PreviewWithThemes
|
||||
|
@ -11,11 +12,13 @@ import androidx.compose.material.Text as MaterialText
|
|||
fun TextButton(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
) {
|
||||
MaterialText(
|
||||
text = text.uppercase(),
|
||||
style = MainTheme.typography.button,
|
||||
modifier = modifier,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package app.k9mail.core.ui.compose.designsystem.atom.text
|
|||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.PreviewWithThemes
|
||||
|
@ -11,11 +12,13 @@ import androidx.compose.material.Text as MaterialText
|
|||
fun TextCaption(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
) {
|
||||
MaterialText(
|
||||
text = text,
|
||||
style = MainTheme.typography.caption,
|
||||
modifier = modifier,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package app.k9mail.core.ui.compose.designsystem.atom.text
|
|||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.PreviewWithThemes
|
||||
|
@ -11,11 +12,13 @@ import androidx.compose.material.Text as MaterialText
|
|||
fun TextHeadline1(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
) {
|
||||
MaterialText(
|
||||
text = text,
|
||||
style = MainTheme.typography.h1,
|
||||
modifier = modifier,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package app.k9mail.core.ui.compose.designsystem.atom.text
|
|||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.PreviewWithThemes
|
||||
|
@ -11,11 +12,13 @@ import androidx.compose.material.Text as MaterialText
|
|||
fun TextHeadline2(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
) {
|
||||
MaterialText(
|
||||
text = text,
|
||||
style = MainTheme.typography.h2,
|
||||
modifier = modifier,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package app.k9mail.core.ui.compose.designsystem.atom.text
|
|||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.PreviewWithThemes
|
||||
|
@ -11,11 +12,13 @@ import androidx.compose.material.Text as MaterialText
|
|||
fun TextHeadline3(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
) {
|
||||
MaterialText(
|
||||
text = text,
|
||||
style = MainTheme.typography.h3,
|
||||
modifier = modifier,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package app.k9mail.core.ui.compose.designsystem.atom.text
|
|||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.PreviewWithThemes
|
||||
|
@ -11,11 +12,13 @@ import androidx.compose.material.Text as MaterialText
|
|||
fun TextHeadline4(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
) {
|
||||
MaterialText(
|
||||
text = text,
|
||||
style = MainTheme.typography.h4,
|
||||
modifier = modifier,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package app.k9mail.core.ui.compose.designsystem.atom.text
|
|||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.PreviewWithThemes
|
||||
|
@ -11,11 +12,13 @@ import androidx.compose.material.Text as MaterialText
|
|||
fun TextHeadline5(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
) {
|
||||
MaterialText(
|
||||
text = text,
|
||||
style = MainTheme.typography.h5,
|
||||
modifier = modifier,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package app.k9mail.core.ui.compose.designsystem.atom.text
|
|||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.PreviewWithThemes
|
||||
|
@ -11,11 +12,13 @@ import androidx.compose.material.Text as MaterialText
|
|||
fun TextHeadline6(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
) {
|
||||
MaterialText(
|
||||
text = text,
|
||||
style = MainTheme.typography.h6,
|
||||
modifier = modifier,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package app.k9mail.core.ui.compose.designsystem.atom.text
|
|||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.PreviewWithThemes
|
||||
|
@ -11,11 +12,13 @@ import androidx.compose.material.Text as MaterialText
|
|||
fun TextOverline(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
) {
|
||||
MaterialText(
|
||||
text = text.uppercase(),
|
||||
style = MainTheme.typography.overline,
|
||||
modifier = modifier,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package app.k9mail.core.ui.compose.designsystem.atom.text
|
|||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.PreviewWithThemes
|
||||
|
@ -11,11 +12,13 @@ import androidx.compose.material.Text as MaterialText
|
|||
fun TextSubtitle1(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
) {
|
||||
MaterialText(
|
||||
text = text,
|
||||
style = MainTheme.typography.subtitle1,
|
||||
modifier = modifier,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package app.k9mail.core.ui.compose.designsystem.atom.text
|
|||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.PreviewWithThemes
|
||||
|
@ -11,11 +12,13 @@ import androidx.compose.material.Text as MaterialText
|
|||
fun TextSubtitle2(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
) {
|
||||
MaterialText(
|
||||
text = text,
|
||||
style = MainTheme.typography.subtitle2,
|
||||
modifier = modifier,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue