SupportingText

fun SupportingText(text: String, state: SupportingTextState = SupportingTextState.DEFAULT, maxLines: Int = 1, showMoreText: String = provideStringResource("show_more"), showLessText: String = provideStringResource("show_less"), modifier: Modifier = Modifier, paddingValues: PaddingValues = PaddingValues( start = Spacing.Spacing16, top = Spacing.Spacing4, end = Spacing.Spacing16, ), onNoInteraction: () -> Pair<MutableInteractionSource, () -> Unit>? = null)

DHIS2 SupportingText component, wraps Compose ClickableText.

Parameters

text

Controls the text to be shown

state

Controls state of the the component. WARNING and ERROR are available apart from default

maxLines

: max number of lines allowed.

showMoreText

the text to show for expansion will be in English by default.

showLessText

the text to be shown for shrinking, also English by default

modifier

: optional modifier.

paddingValues

: optional padding values to be used.

onNoInteraction

: optional interaction source for expand text. If the text to be shown has overflow the component will automatically add the expand functionality.