Supporting Text
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
max Lines
: max number of lines allowed.
show More Text
the text to show for expansion will be in English by default.
show Less Text
the text to be shown for shrinking, also English by default
modifier
: optional modifier.
padding Values
: optional padding values to be used.
on No Interaction
: optional interaction source for expand text. If the text to be shown has overflow the component will automatically add the expand functionality.