Elmish.HTML.Internal
- Package
- purescript-elmish-html
- Repository
- collegevine/purescript-elmish-html
#CSS Source
#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
#StyledTag_ Source
type StyledTag_ optProps = forall props content. ReactChildren content => IsSubsetOf props (optProps + CommonProps) => ValidReactProps (Record props) => String -> Record props -> content -> ReactElement
A CSS-framework-friendly tag-creating function with props. The reqProps
type parameter is a row of optional 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_ optProps = forall props. IsSubsetOf props (optProps + CommonProps) => ValidReactProps (Record props) => String -> Record props -> ReactElement
See comments on StyledTag_
#styledTag_ Source
styledTag_ :: forall props content. ReactChildren content => ValidReactProps props => String -> String -> props -> content -> ReactElement
#styledTagNoContent_ Source
styledTagNoContent_ :: forall props. ValidReactProps props => String -> String -> props -> ReactElement