hyperbole-0.2.0: Web Framework inspired by HTMX
Safe HaskellSafe-Inferred
LanguageGHC2021

Web.Hyperbole.HyperView

Synopsis

Documentation

class (Param id, Param (Action id)) => HyperView id Source #

Associate a live id with a set of actions

Associated Types

type Action id :: Type Source #

Instances

Instances details
(HyperView id, Show id) => HyperView (FormFields f id) Source # 
Instance details

Defined in Web.Hyperbole.Forms

Associated Types

type Action (FormFields f id) Source #

viewId :: forall id ctx. HyperView id => id -> View id () -> View ctx () Source #

button :: HyperView id => Action id -> Mod -> View id () -> View id () Source #

onRequest :: View id () -> View id () -> View 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 #

data Option opt id action Source #

Constructors

Option 

Fields

class Param a where Source #

Minimal complete definition

Nothing

Methods

parseParam :: Text -> Maybe a Source #

default parseParam :: Read a => Text -> Maybe a Source #

toParam :: a -> Text Source #

default toParam :: Show a => a -> Text Source #

Instances

Instances details
Param Text Source # 
Instance details

Defined in Web.Hyperbole.HyperView

Param Integer Source # 
Instance details

Defined in Web.Hyperbole.HyperView

Param () Source # 
Instance details

Defined in Web.Hyperbole.HyperView

Methods

parseParam :: Text -> Maybe () Source #

toParam :: () -> Text Source #

Param Float Source # 
Instance details

Defined in Web.Hyperbole.HyperView

Param Int Source # 
Instance details

Defined in Web.Hyperbole.HyperView

(Param id, Show id) => Param (FormFields f id) Source # 
Instance details

Defined in Web.Hyperbole.Forms

link :: Route a => a -> Mod -> View c () -> View c () Source #