-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pablo Pajuelo Cabezas <[email protected]>
- Loading branch information
Showing
7 changed files
with
132 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...nsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/model/Tab.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
package org.hisp.dhis.mobile.ui.designsystem.component.model | ||
|
||
import androidx.compose.ui.graphics.vector.ImageVector | ||
|
||
data class Tab( | ||
val id: String, | ||
val label: String, | ||
private val iconData: IconData? = null, | ||
) { | ||
fun icon(selected: Boolean) = | ||
iconData?.selectedIcon?.takeIf { selected } ?: iconData?.defaultIcon | ||
} | ||
|
||
data class IconData( | ||
val defaultIcon: ImageVector, | ||
val selectedIcon: ImageVector?, | ||
) |
4 changes: 2 additions & 2 deletions
4
....dhis.mobile.ui.designsystem_VerticalTabSnapshotTest_launchVerticalTabsTest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions
4
...dhis.mobile.ui.designsystem_VerticalTabsSnapshotTest_launchVerticalTabsTest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.