summoner-tui-0.1.0: Tool for scaffolding fully configured batteries-included production-level Haskell projects using TUI.

Safe HaskellNone
LanguageHaskell2010

Summoner.Tui.Field

Description

This modules adds necessary functions for Forms and Form fields that are not covered in brick library.

Synopsis

Documentation

strField :: forall s e n. String -> s -> FormFieldState s e n Source #

A form field with a given text value which can not be modified or changed via any events. It is always valid.

checkboxField Source #

Arguments

:: (Ord n, Show n) 
=> Lens' s Bool

The state lens for this value.

-> n

The resource name for the input field.

-> Text

The label for the check box, to appear at its right.

-> s

The initial form state.

-> FormFieldState s e n 

Custom checkbox with unique fancy style.

Example:

⟦✔⟧ Library
⟦ ⟧ Executable

activeCheckboxField Source #

Arguments

:: Ord n 
=> Lens' s Bool 
-> (s -> n -> Bool)

Function should return False if checkbox should be disabled.

-> n 
-> String

The label for the check box, to appear at its right.

-> s

The initial form state.

-> FormFieldState s e n 

Checkbox that can be disabled.

radioField Source #

Arguments

:: (Ord n, Show n, Eq a) 
=> Lens' s a

The state lens for this value.

-> [(a, n, Text)]

The available choices, in order.

-> s

The initial form state.

-> FormFieldState s e n 

Custom radio button with unique fancy style.

Example:

❮◆❯ Enable  ❮ ❯ Disable

disabledAttr :: AttrName Source #

Attribute for disabled checkboxes.