Safe Haskell | None |
---|---|
Language | GHC2021 |
Web.Rep.Html.Input
Description
Common web page input elements, often with bootstrap scaffolding.
Synopsis
- data Input a = Input {
- inputVal :: a
- inputLabel :: Maybe ByteString
- inputId :: ByteString
- inputType :: InputType
- data InputType
- = Slider [Attr]
- | SliderV [Attr]
- | TextBox
- | TextBox'
- | TextArea Int
- | ColorPicker
- | ChooseFile
- | Dropdown [ByteString]
- | DropdownMultiple [ByteString] Char
- | DropdownSum [ByteString]
- | Datalist [ByteString] ByteString
- | Checkbox Bool
- | Toggle Bool (Maybe ByteString)
- | Button
- markupInput :: (a -> ByteString) -> Input a -> Markup
- class ToByteString a where
- toByteString :: a -> ByteString
Documentation
something that might exist on a web page and be a front-end input to computations.
Constructors
Input | |
Fields
|
Instances
Various types of web page inputs, encapsulating practical bootstrap class functionality
Constructors
Slider [Attr] | |
SliderV [Attr] | |
TextBox | |
TextBox' | |
TextArea Int | |
ColorPicker | |
ChooseFile | |
Dropdown [ByteString] | |
DropdownMultiple [ByteString] Char | |
DropdownSum [ByteString] | |
Datalist [ByteString] ByteString | |
Checkbox Bool | |
Toggle Bool (Maybe ByteString) | |
Button |
Instances
Generic InputType Source # | |||||
Defined in Web.Rep.Html.Input Associated Types
| |||||
Show InputType Source # | |||||
Eq InputType Source # | |||||
type Rep InputType Source # | |||||
Defined in Web.Rep.Html.Input type Rep InputType = D1 ('MetaData "InputType" "Web.Rep.Html.Input" "web-rep-0.12.3.0-HzOxlILyZU53fgeexgkHxI" 'False) (((C1 ('MetaCons "Slider" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Attr])) :+: (C1 ('MetaCons "SliderV" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Attr])) :+: C1 ('MetaCons "TextBox" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TextBox'" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TextArea" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :+: (C1 ('MetaCons "ColorPicker" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ChooseFile" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Dropdown" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ByteString])) :+: (C1 ('MetaCons "DropdownMultiple" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ByteString]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char)) :+: C1 ('MetaCons "DropdownSum" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ByteString])))) :+: ((C1 ('MetaCons "Datalist" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ByteString]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :+: C1 ('MetaCons "Checkbox" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :+: (C1 ('MetaCons "Toggle" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ByteString))) :+: C1 ('MetaCons "Button" 'PrefixI 'False) (U1 :: Type -> Type))))) |
markupInput :: (a -> ByteString) -> Input a -> Markup Source #
class ToByteString a where Source #
Conversion to a ByteString
Minimal complete definition
Nothing
Methods
toByteString :: a -> ByteString Source #
Convert a value to a strict ByteString
default toByteString :: Show a => a -> ByteString Source #
Instances
ToByteString ByteString Source # | |
Defined in Web.Rep.Html.Input Methods toByteString :: ByteString -> ByteString Source # | |
ToByteString Text Source # | |
Defined in Web.Rep.Html.Input Methods toByteString :: Text -> ByteString Source # | |
ToByteString Integer Source # | |
Defined in Web.Rep.Html.Input Methods toByteString :: Integer -> ByteString Source # | |
ToByteString Bool Source # | |
Defined in Web.Rep.Html.Input Methods toByteString :: Bool -> ByteString Source # | |
ToByteString Double Source # | |
Defined in Web.Rep.Html.Input Methods toByteString :: Double -> ByteString Source # | |
ToByteString Float Source # | |
Defined in Web.Rep.Html.Input Methods toByteString :: Float -> ByteString Source # | |
ToByteString Int Source # | |
Defined in Web.Rep.Html.Input Methods toByteString :: Int -> ByteString Source # |