Package com.htueko.resumeapp.presentation.common.component

Functions

Link copied to clipboard
@Composable
fun BodyText(modifier: Modifier = Modifier, text: String, textColour: Color = MaterialTheme.colors.primaryVariant)

title text with normal colour

Link copied to clipboard
@Composable
fun ButtonPrimary(modifier: Modifier = Modifier, text: String, onClick: () -> Unit, isEnable: Boolean = true, backgroundColour: Color = MaterialTheme.colors.primary, textColour: Color = MaterialTheme.colors.onPrimary)

Custom button for primary button

Link copied to clipboard
@Preview(name = "Night Mode", uiMode = 32)
@Preview(name = "Day Mode", uiMode = 16)
@Composable
private fun ButtonPrimaryPreview()

preview of primary button on Dark and Light Theme

Link copied to clipboard
@Composable
fun ButtonSecondary(modifier: Modifier = Modifier, text: String, textColour: Color = MaterialTheme.colors.primary, onClick: () -> Unit)

Custom button for secondary text button

Link copied to clipboard
@Preview(name = "Night Mode", uiMode = 32)
@Preview(name = "Day Mode", uiMode = 16)
@Composable
private fun ButtonSecondaryPreview()

preview of secondary button on Dark and Light Theme

Link copied to clipboard
@Composable
fun OutlinePrimaryButton(modifier: Modifier = Modifier, borderWidth: Dp = 1.dp, borderColour: Color = MaterialTheme.colors.primary, imageVector: ImageVector = Icons.Outlined.FavoriteBorder, contentDescription: String? = null, iconPadding: Dp = 4.dp, text: String, onClick: () -> Unit)

Outline button with icon.

Link copied to clipboard
@Composable
fun RoundAvatarImage(imageUrl: String? = null, contentDescription: String? = null, contentScale: ContentScale = ContentScale.Crop, size: Dp = 200.dp, @DrawableRes drawableResId: Int? = null)

Image view with round corner and border.

Link copied to clipboard
@Composable
fun SecondaryTextField(modifier: Modifier = Modifier, labelText: String, roundCornerDp: Dp = 8.dp, visualTransformation: VisualTransformation = VisualTransformation.None, keyboardType: KeyboardType = KeyboardType.Text, imeAction: ImeAction = ImeAction.Default)
Link copied to clipboard
@Composable
fun TextFieldPrimary(modifier: Modifier = Modifier, text: String, isSingleLine: Boolean = true, maxLines: Int = 1, labelText: String, onTextChanged: (String) -> Unit, hasError: Boolean = false, errorMessage: String? = null, visualTransformation: VisualTransformation = VisualTransformation.None, keyboardType: KeyboardType = KeyboardType.Text, imeAction: ImeAction = ImeAction.Next)

Custom text field for primary usage

Link copied to clipboard
@Preview(name = "Night Mode", uiMode = 32)
@Preview(name = "Day Mode", uiMode = 16)
@Composable
private fun TextFieldPrimaryPreview()

preview of text field primary on Dark and Light Theme

Link copied to clipboard
@Composable
fun TitleText(modifier: Modifier = Modifier, text: String, textColour: Color = MaterialTheme.colors.primary)

title text with bold colour

Link copied to clipboard
@Composable
fun VerticalSpacer(height: Dp)

Vertical custom spacer