InputMatrix

fun InputMatrix(title: String, data: List<ImageCardData>, itemCount: Int = 2, selectedData: ImageCardData? = null, modifier: Modifier = Modifier, state: InputShellState, inputStyle: InputStyle = InputStyle.DataInputStyle(), supportingText: List<SupportingTextData>? = null, legendData: LegendData? = null, isRequired: Boolean = false, testTag: String = "", onSelectionChanged: (ImageCardData) -> Unit, painterFor: Map<String, Painter>? = null)

DHIS2 icon card matrix input component

Parameters

title

: Label of the component.

data

: List of ImageCardData to show.

itemCount

: number of items.

selectedData

: Selected ImageCardData, renders selected UI around that item.

inputStyle

: manages the InputShell style.

supportingText

: List of SupportingTextData that manages all the messages to be shown.

legendData

: LegendData to be render below the input shell.

isRequired

: Mark this input as marked.

testTag

: optional tag for ui testing purposes.

onSelectionChanged

: Callback to receive new selected item.

painterFor

: is a composable function which controls how to paint the load param.

modifier

: optional modifier.