mirror of
https://github.com/anotherhadi/ilovetui.git
synced 2026-08-21 03:55:48 +02:00
21b574eb6f
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
drawer
A full-height panel flush against the left or right edge of an already-rendered background, on top
of it dimmed. The sidebar/drawer equivalent of modal, which it otherwise
mirrors closely: same tea.Msg-triggered stack (ShowMsg/Show), same composite-over-a-string
Render, same rule that content is a tea.Model.
WithSide(Left|Right)andWithWidthare per-drawerShowoptions; width otherwise shrinks to fit content, capped by theModel'sWithMaxWidth.- The stack is a plain LIFO. Only the topmost drawer is updated;
Close()closes it. View(width, height)renders on a blank background of that size, for use as a standalone pane.
See examples/drawer.