-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add NavDivider for non-selectable menu entries
Adds a `NavDivider` dataclass that can be used in a `nav_items` list like a `NavItem`, only taking `title` (and `icon`). It will be rendered in the pull-down with a grey background, and is unclickable. Styling can be changed with CSS: `li[role=divider] { ...; }` As Jinja2 cannot test if a variable is an instance (beyond some built-ins) the `divider` attribute (default: `True`) is tested. Dataclasses do not have the option to make an attribute immutable, so this can be broken by assigning to that attribute.
- Loading branch information
Showing
4 changed files
with
16 additions
and
2 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