Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fluent] Add PillButton and LiteFilter. #59

Merged
merged 2 commits into from
Sep 23, 2024
Merged

Conversation

Sanlorng
Copy link
Collaborator

@Sanlorng Sanlorng commented Jun 2, 2024

Components

  1. PillButton
  2. ListFilter

Basic Usage

val selectedItem = remember { mutableStateOf("") }
LiteFilter {
    items().forEach { name ->
        PillButton(
            selected = selectedItem.value == name,
            onSelectedChanged = {
                if (selectedItem.value != name) {
                    selectedItem.value = name
                } else {
                    selectedItem.value = ""
                }
            },
        ) {
            Text(name)
        }
    }
}

Screenshot

image

image

@Konyaco Konyaco self-requested a review September 23, 2024 05:04
@Sanlorng Sanlorng merged commit 74112d0 into dev Sep 23, 2024
@Sanlorng Sanlorng deleted the component/pill-button branch September 23, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants