From a917c7594b3fa12fbb27cf676c98e5fce58f800a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Miguel=20Rubio?= Date: Wed, 23 Aug 2023 12:30:58 +0200 Subject: [PATCH] Update README.md --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d9ace0cd8..910bb4825 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,44 @@ -# dhis2-mobile-ui -Compose Multiplatform DHIS2 Mobile UI components library +# DHIS2 Mobile UI + +> **@dhis2/dhis2-mobile-ui** is a [Compose Multiplatform](https://www.jetbrains.com/lp/compose-multiplatform/) DHIS2 design system library for [Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html) applications. + +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**: + +```kotlin +dependencies { + implementation("org.hisp.dhis.mobile:designsystem:1.0-SNAPSHOT") +} +``` + +# Usage + +```kotlin +setContent { + DHIS2Theme { + // A surface container using the 'background' color from the theme + Surface( + modifier = Modifier.fillMaxSize(), + color = SurfaceColor.Container + ) { + Components() + } + } +} +``` + +```kotlin +Button( + text = provideStringResource("show_more"), + icon = { + Icon( + painter = provideDHIS2Icon(resourceName = "dhis2_blood_a_n_positive"), + contentDescription = "" + ) + }, + style = ButtonStyle.KEYBOARDKEY +) {} +```