InputFileResource

fun InputFileResource(title: String, buttonText: String, fileName: String? = null, fileWeight: String? = null, onSelectFile: () -> Unit, onUploadFile: () -> Unit, onClear: () -> Unit = {}, uploadFileState: UploadFileState = ADD, inputShellState: InputShellState = InputShellState.UNFOCUSED, inputStyle: InputStyle = InputStyle.DataInputStyle(), supportingText: List<SupportingTextData>? = null, legendData: LegendData? = null, isRequired: Boolean = false, modifier: Modifier = Modifier)

DHIS2 Input File Resource. Wraps DHIS · InputShell.

Parameters

title

: controls the text to be shown for the title.

buttonText

: text to be used for action button.

fileName

: text to be used for file name.

fileWeight

: text to be used for file weight.

onSelectFile

: callback for when user wants to download file.

onUploadFile

: callback for user to upload file.

onClear

: callback for user to delete file.

inputShellState

: Manages the InputShell state.

supportingText

: is a list of SupportingTextData that manages all the messages to be shown.

legendData

: manages the legendComponent.

uploadFileState

: the state of the component, can be UPLOADING, LOADED or ADD.

inputStyle

: manages the InputShell style.

modifier

: allows a modifier to be passed externally.

isRequired

: whether the field is required or not.