Module

Elmish.HTML.Internal

#CSS

data CSS :: Type

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

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

_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

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_

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

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

type StyledTagNoContent = String -> ReactElement

See comments on StyledTag

#StyledTagNoContent_

type StyledTagNoContent_ optProps = forall props. IsSubsetOf props (optProps + CommonProps) => ValidReactProps (Record props) => String -> Record props -> ReactElement

See comments on StyledTag_

#styledTag_

styledTag_ :: forall props content. ReactChildren content => ValidReactProps props => String -> String -> props -> content -> ReactElement

#styledTag

#styledTagNoContent_

styledTagNoContent_ :: forall props. ValidReactProps props => String -> String -> props -> ReactElement

Modules