Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get[T any](c *Controller, modal ModalComponent[T]) T
Types ¶
type Controller ¶
type Controller struct { reactea.BasicComponent // contains filtered or unexported fields }
func NewController ¶
func NewController(initFunc func(*Controller) func() tea.Cmd) *Controller
func (*Controller) Init ¶
func (c *Controller) Init() tea.Cmd
func (*Controller) Render ¶
func (c *Controller) Render(width, height int) string
func (*Controller) Run ¶
func (c *Controller) Run(f func(*Controller) func() tea.Cmd) tea.Cmd
type ModalComponent ¶
type ModalResult ¶
func Error ¶
func Error[T any](err error) ModalResult[T]
func Ok ¶
func Ok[T any](ret T) ModalResult[T]
func Show ¶
func Show[T any](c *Controller, modal ModalComponent[T]) ModalResult[T]
func (*ModalResult[T]) Get ¶
func (result *ModalResult[T]) Get() (T, error)
Allows for value, err := result.Get() syntactic sugar instead of manually destructuring fields
Click to show internal directories.
Click to hide internal directories.