Skip to content

Commit

Permalink
Merge pull request #43 from AnswerDotAI/Navbar-improvement
Browse files Browse the repository at this point in the history
Improve defaults for Navbar when text is passed
  • Loading branch information
Isaac-Flath authored Jan 31, 2025
2 parents 33903a9 + 0c3a07a commit b33df11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions monsterui/franken.py
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ def _item(link):
return Div(
Container(
Div(cls='md:flex md:relative')(
NavBarLSide(H1(title), menu_icon),
NavBarLSide(H1(title) if isinstance(title, str) else title, menu_icon),
NavBarRSide(
NavBarNav(*nav_links, cls='w-full flex-col md:flex-row'),
cls='hidden md:flex md:justify-between ', id=_id, uk_scrollspy_nav=_uk_scrollspy_nav, **kwargs))),
Expand Down Expand Up @@ -1318,8 +1318,8 @@ def CardContainer(*c, # Components (typically `CardHeader`, `CardBody`, `CardFoo

# %% ../nbs/02_franken.ipynb
def Card(*c, # Components that go in the body (Main content of the card such as a form, and image, a signin form, etc.)
header=None, # A component that goes in the header (often a `ModalTitle` and description)
footer=None, # A component that goes in the footer (often a `ModalCloseButton`)
header:FT|Iterable[FT]=None, # Component(s) that goes in the header (often a `ModalTitle` and a subtitle)
footer:FT|Iterable[FT]=None, # Component(s) that goes in the footer (often a `ModalCloseButton`)
body_cls='space-y-6', # classes for the body
header_cls=(), # classes for the header
footer_cls=(), # classes for the footer
Expand Down
6 changes: 3 additions & 3 deletions nbs/02_franken.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2120,7 +2120,7 @@
" return Div(\n",
" Container(\n",
" Div(cls='md:flex md:relative')(\n",
" NavBarLSide(H1(title), menu_icon),\n",
" NavBarLSide(H1(title) if isinstance(title, str) else title, menu_icon),\n",
" NavBarRSide(\n",
" NavBarNav(*nav_links, cls='w-full flex-col md:flex-row'),\n",
" cls='hidden md:flex md:justify-between ', id=_id, uk_scrollspy_nav=_uk_scrollspy_nav, **kwargs))),\n",
Expand Down Expand Up @@ -2382,8 +2382,8 @@
"source": [
"#|export\n",
"def Card(*c, # Components that go in the body (Main content of the card such as a form, and image, a signin form, etc.)\n",
" header=None, # A component that goes in the header (often a `ModalTitle` and description)\n",
" footer=None, # A component that goes in the footer (often a `ModalCloseButton`)\n",
" header:FT|Iterable[FT]=None, # Component(s) that goes in the header (often a `ModalTitle` and a subtitle)\n",
" footer:FT|Iterable[FT]=None, # Component(s) that goes in the footer (often a `ModalCloseButton`)\n",
" body_cls='space-y-6', # classes for the body\n",
" header_cls=(), # classes for the header\n",
" footer_cls=(), # classes for the footer\n",
Expand Down

0 comments on commit b33df11

Please sign in to comment.