Elmish.HTML.Internal
- Package
- purescript-elmish-html
- Repository
- collegevine/purescript-elmish-html
#CSS Source
data CSS
The type of style
props in React elements. Construct values of this type
via the css
function. For example:
div { style: css { height: "50px", width: "50px" } }
Instances
#css Source
css :: forall r. Record r -> CSS
Construct a value of type CSS
, which is the type of style
props, out of
a record. For example:
div { style: css { height: "50px", width: "50px" } }
There is currently no type safety regarding the specific fields admitted in the style, or different types of those fields. This has been deemed "good enough" for now.
#_data Source
_data :: forall r. Homogeneous r String => Record r -> Object String
A reexport of Foreign.Object.fromHomogeneous
, provided here for
convenience to construct dictionaries for use as value of the special
_data
prop. For example:
div_ "row" { _data: _data { "test-id": "foo", toggle: "autosize" } }
This will correspond to the following HTML:
<div class="row" data-test-id="foo" data-toggle="autosize">
#unsafeCreateDOMComponent Source
unsafeCreateDOMComponent :: String -> ImportedReactComponent
Retype a string as a React component, which is something that React
supports out of the box - i.e. a string "div" can be used in place of a
React.Component
-descendant class
#Tag Source
type Tag :: Row Type -> Type
type Tag allowedProps = forall props content. ReactChildren content => IsSubsetOf props allowedProps => ValidReactProps (Record props) => Record props -> content -> ReactElement
A tag-creating function with props and content (aka children).
allowedProps
is a row of all possible props for this tag.
#TagNoContent Source
type TagNoContent :: Row Type -> Type
type TagNoContent allowedProps = forall props. IsSubsetOf props allowedProps => ValidReactProps (Record props) => Record props -> ReactElement
A tag-creating function with props and without content (aka children).
allowedProps
is a row of all possible props for this tag.
#StyledTag_ Source
type StyledTag_ :: Row Type -> Type
type StyledTag_ allowedProps = forall props content. ReactChildren content => IsSubsetOf props allowedProps => ValidReactProps (Record props) => String -> Record props -> content -> ReactElement
A CSS-framework-friendly tag-creating function with props. allowedProps
is a row of all possible props for this tag. The point of
CSS-framework-friendliness is that the className
prop is given as first
parameter rather than being part of the other props, so we can write div_
"row" {}
rather than div { className: "row" }
#StyledTag Source
type StyledTag = forall content. ReactChildren content => String -> content -> ReactElement
A CSS-framework-friendly tag-creating function without props. The point of
CSS-framework-friendliness is that the className
prop is given as first
parameter rather than being part of the other props, so we can write div
"row"
rather than div { className: "row" }
#StyledTagNoContent Source
type StyledTagNoContent = String -> ReactElement
See comments on StyledTag
#StyledTagNoContent_ Source
type StyledTagNoContent_ :: Row Type -> Type
type StyledTagNoContent_ allowedProps = forall props. IsSubsetOf props allowedProps => ValidReactProps (Record props) => String -> Record props -> ReactElement
See comments on StyledTag_
#tag Source
tag :: forall props content. ReactChildren content => String -> Record props -> content -> ReactElement
#tagNoContent Source
tagNoContent :: forall props. String -> Record props -> ReactElement
#styledTag_ Source
styledTag_ :: forall props content. ReactChildren content => String -> String -> Record props -> content -> ReactElement
#styledTagNoContent_ Source
styledTagNoContent_ :: forall props. String -> String -> Record props -> ReactElement
#IsSubsetOf Source
class IsSubsetOf :: Row Type -> Row Type -> Constraint
class IsSubsetOf (subset :: Row Type) (superset :: Row Type)
Instances
(Union subset r superset) => IsSubsetOf subset superset