Skip to content

Commit

Permalink
Add legend data as param to InputDateTime
Browse files Browse the repository at this point in the history
  • Loading branch information
msasikanth committed Oct 13, 2023
1 parent da3b37e commit 7e549b2
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing
* @param actionIconType: Type of action icon to display. [DateTimeActionIconType.DATE_TIME], [DateTimeActionIconType.DATE], [DateTimeActionIconType.TIME]
* @param onActionClicked: Callback to handle the action when the calendar icon is clicked.
* @param state: [InputShellState]
* @param legendData: [LegendData]
* @param supportingText: List of [SupportingTextData] that manages all the messages to be shown.
* @param isRequired: Mark this input as marked
* @param visualTransformation: Pass a visual transformation to format the date input visually. By default uses [DateTransformation]
Expand All @@ -41,6 +42,7 @@ fun InputDateTime(
onActionClicked: () -> Unit,
modifier: Modifier = Modifier,
state: InputShellState = InputShellState.UNFOCUSED,
legendData: LegendData? = null,
supportingText: List<SupportingTextData>? = null,
isRequired: Boolean = false,
imeAction: ImeAction = ImeAction.Next,
Expand Down Expand Up @@ -121,6 +123,11 @@ fun InputDateTime(
)
}
},
legend = {
legendData?.let {
Legend(legendData, Modifier.testTag("INPUT_DATE_TIME_LEGEND"))
}
},
)
}

Expand Down

0 comments on commit 7e549b2

Please sign in to comment.