Skip to content

Instantly share code, notes, and snippets.

@donynuransyah
Created December 29, 2021 16:18
Show Gist options
  • Save donynuransyah/0faeda31e4278206fcca4ba09bfbf68c to your computer and use it in GitHub Desktop.
Save donynuransyah/0faeda31e4278206fcca4ba09bfbf68c to your computer and use it in GitHub Desktop.
text compose attribute
@Composable
fun Text(
text: String,
modifier: Modifier = Modifier,
color: Color = Color.Unspecified,
fontSize: TextUnit = TextUnit.Unspecified,
fontStyle: FontStyle? = null,
fontWeight: FontWeight? = null,
fontFamily: FontFamily? = null,
letterSpacing: TextUnit = TextUnit.Unspecified,
textDecoration: TextDecoration? = null,
textAlign: TextAlign? = null,
lineHeight: TextUnit = TextUnit.Unspecified,
overflow: TextOverflow = TextOverflow.Clip,
softWrap: Boolean = true,
maxLines: Int = Int.MAX_VALUE,
onTextLayout: (TextLayoutResult) -> Unit = {},
style: TextStyle = LocalTextStyle.current
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment