From 8930914c9efb2e0e4c38667ce66e24a7df94300d Mon Sep 17 00:00:00 2001 From: Siddharth Agarwal Date: Thu, 14 Sep 2023 11:33:13 +0530 Subject: [PATCH] add documentation for radio button input --- .../designsystem/component/RadioButtonInput.kt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/RadioButtonInput.kt b/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/RadioButtonInput.kt index d2e908932..bf4bfa973 100644 --- a/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/RadioButtonInput.kt +++ b/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/RadioButtonInput.kt @@ -3,6 +3,7 @@ package org.hisp.dhis.mobile.ui.designsystem.component import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.Cancel import androidx.compose.material3.Icon +import androidx.compose.material3.RadioButton import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.platform.testTag @@ -10,6 +11,23 @@ import org.hisp.dhis.mobile.ui.designsystem.component.InputShellState.DISABLED import org.hisp.dhis.mobile.ui.designsystem.component.InputShellState.UNFOCUSED import org.hisp.dhis.mobile.ui.designsystem.component.Orientation.VERTICAL +/** + * DHIS2 Radio Button Input. Wraps DHIS ยท [RadioButton]. + * @param title controls the text to be shown for the title + * @param radioButtonData Contains all the data that will be displayed, the list type is RadioButtonData, + * It's parameters are uid for identifying the component, selected for controlling which option is selected, + * enabled controls if the component is clickable and textInput displaying the option text. + * @param modifier allows a modifier to be passed externally + * @param orientation Controls how the radio buttons will be displayed, HORIZONTAL for rows or + * VERTICAL for columns. + * @param state Manages the InputShell state + * @param supportingText is a list of SupportingTextData that + * manages all the messages to be shown + * @param legendData manages the legendComponent + * @param isRequired controls whether the field is mandatory or not + * @param itemSelected controls which item is selected. + * @param onItemChange is a callback to notify which item has changed into the block. + */ @Composable fun RadioButtonInput( title: String,