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

Create a "single-top" MenuHost #40

Merged
merged 2 commits into from
Jan 8, 2024
Merged

Create a "single-top" MenuHost #40

merged 2 commits into from
Jan 8, 2024

Conversation

boswelja
Copy link
Owner

@boswelja boswelja commented Jan 8, 2024

We now have two default implementations of MenuHost!

  • The original implementation has been renamed to CumulativeMenuHost. As its name suggests, it accumulates all provided MenuItems and exposes them all at once. This is useful for breaking down bigger menus into separate Composables.
  • A new SingleTopMenuHost! This MenuHost will collect all sets of MenuItems, and expose only the last set of items. This should be useful for screens that provide toolbar items, since you don't (typically) want to mix screen actions.

@boswelja boswelja merged commit 9fbaa6c into main Jan 8, 2024
6 checks passed
@boswelja boswelja deleted the different-menu-host-type branch January 8, 2024 10:45
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.

1 participant