Module

Solid.Internal.Props

Package
purescript-purs-solid
Repository
arazorda/purs-solid

Element props as records. Each field is converted to a Prop by a function the instances build once per record type, so rendering only reads the fields and applies those functions. vite/compile.mjs reads compiled props dictionaries by these instances' names.

#Props Source

class Props :: Row Type -> Row Type -> Constraintclass Props row props  where

props is a record whose fields row accepts (see Solid.DOM.HTML).

Members

Instances

#UntypedProps Source

class UntypedProps :: Row Type -> Constraintclass UntypedProps props  where

Members

Instances

#Children Source

class Children children  where

An element's children: one element, text (String or reactive), or an array.

Members

Instances

#applyProps Source

applyProps :: forall props r. Array (Record props -> Prop ()) -> Record props -> Array (Prop r)

#Typed Source

data Typed :: Row Type -> Typedata Typed (row :: Row Type)

Fields checked against an element's row.

Instances

#Untyped Source

data Untyped

Fields taken as they are, for any tag.

Instances

#PropsRL Source

class PropsRL :: Type -> RowList Type -> Row Type -> Constraintclass PropsRL kind list props  where

Members

Instances

#Entry Source

class Entry :: Type -> Symbol -> Type -> Constraintclass Entry kind label value  where

One field, by its label.

Members

Instances

#Prefixed Source

class Prefixed :: Boolean -> Boolean -> Boolean -> Type -> Symbol -> Type -> Constraintclass Prefixed isData isAria isEvent kind label value  where

data-* attributes, aria-* attributes (from Solid.DOM.Aria), on:* events, then everything else.

Members

Instances

#Supports Source

class Supports :: Type -> Symbol -> Constraintclass Supports kind label 

Instances

#ElementType Source

class ElementType kind element | kind -> element

Instances

#Attribute Source

class Attribute :: Type -> Symbol -> Type -> Constraintclass Attribute kind label value  where

Members

Instances

#RowField Source

class RowField type_ value  where

A row field: an event handler for event types, otherwise an attribute value or an accessor of one.

Members

Instances

#UntypedField Source

class UntypedField value  where

On an untyped element, functions are event handlers (label them onX) and anything else is an attribute named exactly as the label.

Members

Instances

#ClassValue Source

class ClassValue value  where

class: a string (or accessor), or a record of classes to toggles.

Members

Instances

#StyleValue Source

class StyleValue value  where

style: CSS text (or an accessor), or a record of CSS properties.

Members

Instances

#Toggles Source

class Toggles :: RowList Type -> Row Type -> Constraintclass Toggles list classes  where

Members

Instances

#StyleEntries Source

class StyleEntries :: RowList Type -> Row Type -> Constraintclass StyleEntries list properties  where

Members

Instances

#StartsWith Source

class StartsWith :: Symbol -> Symbol -> Boolean -> Constraintclass StartsWith prefix symbol result | prefix symbol -> result

Instances

#StartsWithChar Source

class StartsWithChar :: Symbol -> Symbol -> Symbol -> Symbol -> Boolean -> Constraintclass StartsWithChar prefixHead prefixTail symbolHead symbolTail result | prefixHead prefixTail symbolHead symbolTail -> result

Instances

#typedElement Source

typedElement :: forall @row props children. Props row props => Children children => Namespace -> String -> Record props -> children -> JSX

#typedVoidElement Source

typedVoidElement :: forall @row props. Props row props => Namespace -> String -> Record props -> JSX

#untypedElement Source

untypedElement :: forall props children. UntypedProps props => Children children => Namespace -> String -> Record props -> children -> JSX

#targetValue Source

targetValue :: Event -> Effect String

The value of the element the handler is on (an input, select or textarea).

#targetChecked Source

targetChecked :: Event -> Effect Boolean

The checked state of the checkbox or radio the handler is on.