dhis2 / dhis2-mobile-ui

Compose Multiplatfform DHIS2 Mobile UI components library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
) {}

About

Compose Multiplatfform DHIS2 Mobile UI components library

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Kotlin 100.0%