From 443f7614669d76a23af7293af2e0aa62e404869b Mon Sep 17 00:00:00 2001 From: "DESKTOP-M49RTHN\\cthuc" Date: Fri, 10 May 2024 11:55:53 +0200 Subject: [PATCH] updated: [ANDROAPP-6097] Documentation added --- .../mobile/ui/designsystem/component/AssistChip.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/AssistChip.kt b/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/AssistChip.kt index 766f9bb60..76475f62b 100644 --- a/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/AssistChip.kt +++ b/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/AssistChip.kt @@ -8,6 +8,7 @@ import androidx.compose.material.ripple.LocalRippleTheme import androidx.compose.material3.AssistChip import androidx.compose.material3.AssistChipDefaults import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.FilterChip import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider @@ -24,6 +25,18 @@ import org.hisp.dhis.mobile.ui.designsystem.theme.Ripple import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor import org.hisp.dhis.mobile.ui.designsystem.theme.TextColor +/** + * DHIS2 [AssistChip] button with custom icon slot. + * wraps Material 3 [AssistChip]. + * AssistChips are used to trigger actions. + * @param label: the text to be shown. + * @param icon: custom leading icon to be shown, use AssistChipDefaults in the + * Icon composable modifier to set the size of the icon. + * @param enabled: controls the enabled state. "False" will disabled the component + * @param modifier: optional [Modifier]. + * @param onClick: Will be called when the user taps the chip. + * @param badge: the text to be displayed within the badge. + */ @OptIn(ExperimentalMaterial3Api::class) @Composable fun AssistChip(