Safe Haskell | None |
---|---|
Language | Haskell2010 |
This modules adds necessary functions for Forms and Form fields
that are not covered in brick
library.
Synopsis
- strField :: forall s e n. String -> s -> FormFieldState s e n
- checkboxField :: (Ord n, Show n) => Lens' s Bool -> n -> Text -> s -> FormFieldState s e n
- activeCheckboxField :: forall n s e. Ord n => Lens' s Bool -> (s -> n -> Bool) -> n -> String -> s -> FormFieldState s e n
- radioField :: (Ord n, Show n, Eq a) => Lens' s a -> [(a, n, Text)] -> s -> FormFieldState s e n
- disabledAttr :: AttrName
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.
:: (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
:: Ord n | |
=> Lens' s Bool | |
-> (s -> n -> Bool) | Function should return |
-> 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.
:: (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.