Created
March 17, 2024 23:12
-
-
Save fvilarino/9aa91ecc6bfb7f17c9065f104bc259b3 to your computer and use it in GitHub Desktop.
Cihp Selector - State Holder API
This file contains hidden or 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
// 1 | |
enum class SelectionMode { | |
Single, | |
Multiple, | |
} | |
// 2 | |
@Stable | |
interface ChipSelectorState { | |
// 3 | |
val chips: List<String> | |
// 4 | |
val selectedChips: List<String> | |
// 5 | |
fun onChipClick(chip: String) | |
// 6 | |
fun isSelected(chip: String): Boolean | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment