Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 1.23 KB

README.md

File metadata and controls

46 lines (37 loc) · 1.23 KB

DHIS2 Mobile UI

@dhis2/dhis2-mobile-ui is a Compose Multiplatform DHIS2 design system library for Kotlin Multiplatform applications.

DHIS2 Mobile UI library is based in the DHIS2 Mobile Design System Figma library.

This library currently supports desktop and Android targets, in the next versions it will support iOS and web.

Installation

In the module build.gradle.kts:

dependencies {
  implementation("org.hisp.dhis.mobile:designsystem:1.0-SNAPSHOT")
}

Usage

setContent {
    DHIS2Theme {
        // A surface container using the 'background' color from the theme
        Surface(
            modifier = Modifier.fillMaxSize(),
            color = SurfaceColor.Container
        ) {
            Components()
        }
    }
}
Button(
    text = provideStringResource("show_more"),
    icon = {
        Icon(
            painter = provideDHIS2Icon(resourceName = "dhis2_blood_a_n_positive"),
            contentDescription = ""
        )
    },
    style = ButtonStyle.KEYBOARDKEY
) {}