Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- class (Param id, Param (Action id)) => HyperView id where
- viewId :: forall id ctx. HyperView id => id -> View id () -> View ctx ()
- button :: HyperView id => Action id -> Mod -> View id () -> View id ()
- onRequest :: View id () -> View id () -> View id ()
- dataTarget :: Param a => a -> Mod
- target :: HyperView id => id -> View id () -> View a ()
- dropdown :: HyperView id => (opt -> action) -> (opt -> Bool) -> Mod -> View (Option opt id action) () -> View id ()
- option :: (HyperView id, Eq opt) => opt -> View (Option opt id (Action id)) () -> View (Option opt id (Action id)) ()
- selected :: Bool -> Mod
- data Option opt id action = Option {}
- class Param a where
- parseParam :: Text -> Maybe a
- toParam :: a -> Text
- link :: Route a => a -> Mod -> View c () -> View c ()
Documentation
class (Param id, Param (Action id)) => HyperView id Source #
Associate a live id with a set of actions
Instances
(HyperView id, Show id) => HyperView (FormFields f id) Source # | |
Defined in Web.Hyperbole.Forms type Action (FormFields f id) Source # |
dataTarget :: Param a => a -> Mod Source #
Internal
target :: HyperView id => id -> View id () -> View a () Source #
Change the target of any code running inside, allowing actions to target other live views on the page
dropdown :: HyperView id => (opt -> action) -> (opt -> Bool) -> Mod -> View (Option opt id action) () -> View id () Source #
option :: (HyperView id, Eq opt) => opt -> View (Option opt id (Action id)) () -> View (Option opt id (Action id)) () Source #
Nothing
parseParam :: Text -> Maybe a Source #
Instances
Param Text Source # | |
Param Integer Source # | |
Param () Source # | |
Defined in Web.Hyperbole.HyperView | |
Param Float Source # | |
Param Int Source # | |
(Param id, Show id) => Param (FormFields f id) Source # | |
Defined in Web.Hyperbole.Forms parseParam :: Text -> Maybe (FormFields f id) Source # toParam :: FormFields f id -> Text Source # |