Skip to content

Commit

Permalink
Merge pull request #3 from payan-app/text-color
Browse files Browse the repository at this point in the history
feat: add color to text component
  • Loading branch information
juandahurt authored Oct 9, 2022
2 parents 2f217d5 + 7b1dd5b commit 3cb59a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.*
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import juandahurt.purace.ui.basic.PuraceTextView
import juandahurt.purace.ui.basic.text.PuraceTextView
import juandahurt.purace.ui.style.PuraceStyle

@Composable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package juandahurt.purace.ui.basic
package juandahurt.purace.ui.basic.text

import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
Expand All @@ -22,7 +23,8 @@ fun PuraceTextView(
text: String,
size: Int = 12,
weight: FontWeight = FontWeight.Normal,
textAlign: TextAlign = TextAlign.Justify
textAlign: TextAlign = TextAlign.Justify,
color: Color = PuraceStyle.Color.N1
) {
Text(
modifier = modifier,
Expand All @@ -31,6 +33,6 @@ fun PuraceTextView(
fontWeight = weight,
fontSize = size.sp,
textAlign = textAlign,
color = PuraceStyle.Color.N1
color = color
)
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package juandahurt.puracedemo.examples.basic

import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController
import juandahurt.purace.ui.basic.PuraceTextView
import juandahurt.purace.ui.basic.text.PuraceTextView
import juandahurt.purace.ui.basic.scaffold.PuraceScaffold

@Composable
Expand Down

0 comments on commit 3cb59a2

Please sign in to comment.