Module
React.Basic.DOM
- Package
- purescript-react-basic
- Repository
- lumihq/purescript-react-basic
This module defines helper functions for creating virtual DOM elements safely.
Note: DOM element props are provided as records, and checked using Union
constraints. This means that we don't need to provide all props, but any we
do provide must have the correct types.
#mergeStyles Source
mergeStyles :: Array CSS -> CSS
Merge styles from right to left. Uses Object.assign
.
E.g.
style: mergeCSS [ (css { padding: "5px" }), props.style ]
#unsafeCreateDOMComponent Source
unsafeCreateDOMComponent :: forall props. String -> ReactComponent props
#abbr Source
abbr :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_abbr) => Record attrs -> JSX
#Props_address Source
type Props_address = (children :: Array JSX)
#address Source
address :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_address) => Record attrs -> JSX
#area Source
area :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_area) => Record attrs -> JSX
#Props_article Source
type Props_article = (children :: Array JSX)
#article Source
article :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_article) => Record attrs -> JSX
#Props_aside Source
type Props_aside = (children :: Array JSX)
#aside Source
aside :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_aside) => Record attrs -> JSX
#audio Source
audio :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_audio) => Record attrs -> JSX
#Props_base Source
type Props_base = (href :: String, target :: String)
#base Source
base :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_base) => Record attrs -> JSX
#blockquote Source
blockquote :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_blockquote) => Record attrs -> JSX
#Props_body Source
type Props_body = (children :: Array JSX)
#body Source
body :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_body) => Record attrs -> JSX
#button Source
button :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_button) => Record attrs -> JSX
#canvas Source
canvas :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_canvas) => Record attrs -> JSX
#Props_caption Source
type Props_caption = (children :: Array JSX)
#caption Source
caption :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_caption) => Record attrs -> JSX
#Props_cite Source
type Props_cite = (children :: Array JSX)
#cite Source
cite :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_cite) => Record attrs -> JSX
#Props_code Source
type Props_code = (children :: Array JSX)
#code Source
code :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_code) => Record attrs -> JSX
#Props_colgroup Source
type Props_colgroup = (children :: Array JSX, span :: Number, width :: String)
#colgroup Source
colgroup :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_colgroup) => Record attrs -> JSX
#data' Source
data' :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_data) => Record attrs -> JSX
#Props_datalist Source
type Props_datalist = (children :: Array JSX)
#datalist Source
datalist :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_datalist) => Record attrs -> JSX
#details Source
details :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_details) => Record attrs -> JSX
#dialog Source
dialog :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_dialog) => Record attrs -> JSX
#Props_embed Source
type Props_embed = (height :: String, src :: String, type :: String, width :: String)
#embed Source
embed :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_embed) => Record attrs -> JSX
#fieldset Source
fieldset :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_fieldset) => Record attrs -> JSX
#Props_figcaption Source
type Props_figcaption = (children :: Array JSX)
#figcaption Source
figcaption :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_figcaption) => Record attrs -> JSX
#Props_figure Source
type Props_figure = (children :: Array JSX)
#figure Source
figure :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_figure) => Record attrs -> JSX
#Props_form Source
type Props_form = (accept :: String, action :: String, children :: Array JSX, method :: String, name :: String, onChange :: EventHandler, onInput :: EventHandler, onInvalid :: EventHandler, onSubmit :: EventHandler, target :: String)
#form Source
form :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_form) => Record attrs -> JSX
#head Source
head :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_head) => Record attrs -> JSX
#Props_header Source
type Props_header = (children :: Array JSX)
#header Source
header :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_header) => Record attrs -> JSX
#Props_hgroup Source
type Props_hgroup = (children :: Array JSX)
#hgroup Source
hgroup :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_hgroup) => Record attrs -> JSX
#html Source
html :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_html) => Record attrs -> JSX
#iframe Source
iframe :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_iframe) => Record attrs -> JSX
#Props_input Source
type Props_input = (accept :: String, alt :: String, autoCapitalize :: String, autoCorrect :: String, autoSave :: String, checked :: Boolean, defaultChecked :: String, defaultValue :: String, disabled :: Boolean, form :: String, height :: String, list :: String, max :: Number, min :: Number, multiple :: Boolean, name :: String, onChange :: EventHandler, pattern :: String, placeholder :: String, required :: Boolean, results :: String, size :: Number, src :: String, step :: String, title :: String, type :: String, value :: String, width :: String)
#input Source
input :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_input) => Record attrs -> JSX
#keygen Source
keygen :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_keygen) => Record attrs -> JSX
#label Source
label :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_label) => Record attrs -> JSX
#Props_legend Source
type Props_legend = (children :: Array JSX)
#legend Source
legend :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_legend) => Record attrs -> JSX
#link Source
link :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_link) => Record attrs -> JSX
#Props_main Source
type Props_main = (children :: Array JSX)
#main Source
main :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_main) => Record attrs -> JSX
#Props_mark Source
type Props_mark = (children :: Array JSX)
#mark Source
mark :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_mark) => Record attrs -> JSX
#Props_math Source
type Props_math = (children :: Array JSX)
#math Source
math :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_math) => Record attrs -> JSX
#Props_meta Source
type Props_meta = (content :: String, name :: String)
#meta Source
meta :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_meta) => Record attrs -> JSX
#meter Source
meter :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_meter) => Record attrs -> JSX
#Props_noscript Source
type Props_noscript = (children :: Array JSX)
#noscript Source
noscript :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_noscript) => Record attrs -> JSX
#object Source
object :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_object) => Record attrs -> JSX
#Props_optgroup Source
type Props_optgroup = (children :: Array JSX, disabled :: Boolean, label :: String)
#optgroup Source
optgroup :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_optgroup) => Record attrs -> JSX
#option Source
option :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_option) => Record attrs -> JSX
#output Source
output :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_output) => Record attrs -> JSX
#param Source
param :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_param) => Record attrs -> JSX
#Props_picture Source
type Props_picture = (children :: Array JSX)
#picture Source
picture :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_picture) => Record attrs -> JSX
#progress Source
progress :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_progress) => Record attrs -> JSX
#Props_ruby Source
type Props_ruby = (children :: Array JSX)
#ruby Source
ruby :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_ruby) => Record attrs -> JSX
#Props_samp Source
type Props_samp = (children :: Array JSX)
#samp Source
samp :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_samp) => Record attrs -> JSX
#script Source
script :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_script) => Record attrs -> JSX
#Props_section Source
type Props_section = (children :: Array JSX)
#section Source
section :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_section) => Record attrs -> JSX
#select Source
select :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_select) => Record attrs -> JSX
#slot Source
slot :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_slot) => Record attrs -> JSX
#Props_small Source
type Props_small = (children :: Array JSX)
#small Source
small :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_small) => Record attrs -> JSX
#Props_source Source
type Props_source = (media :: String, sizes :: String, src :: String, type :: String)
#source Source
source :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_source) => Record attrs -> JSX
#Props_span Source
type Props_span = (children :: Array JSX)
#span Source
span :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_span) => Record attrs -> JSX
#Props_strong Source
type Props_strong = (children :: Array JSX)
#strong Source
strong :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_strong) => Record attrs -> JSX
#style Source
style :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_style) => Record attrs -> JSX
#Props_summary Source
type Props_summary = (children :: Array JSX)
#summary Source
summary :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_summary) => Record attrs -> JSX
#Props_svg Source
type Props_svg = (accentHeight :: String, accumulate :: String, additive :: String, alignmentBaseline :: String, allowReorder :: String, alphabetic :: String, amplitude :: String, arabicForm :: String, ascent :: String, attributeName :: String, attributeType :: String, autoReverse :: String, azimuth :: String, baseFrequency :: String, baseProfile :: String, baselineShift :: String, bbox :: String, begin :: String, bias :: String, by :: String, calcMode :: String, capHeight :: String, children :: Array JSX, clip :: String, clipPath :: String, clipPathUnits :: String, clipRule :: String, color :: String, colorInterpolation :: String, colorInterpolationFilters :: String, colorProfile :: String, colorRendering :: String, contentScriptType :: String, contentStyleType :: String, cursor :: String, cx :: String, cy :: String, d :: String, decelerate :: String, descent :: String, diffuseConstant :: String, direction :: String, display :: String, divisor :: String, dominantBaseline :: String, dur :: String, dx :: String, dy :: String, edgeMode :: String, elevation :: String, enableBackground :: String, end :: String, exponent :: String, externalResourcesRequired :: String, fill :: String, fillOpacity :: String, fillRule :: String, filter :: String, filterRes :: String, filterUnits :: String, floodColor :: String, floodOpacity :: String, focusable :: String, fontFamily :: String, fontSize :: String, fontSizeAdjust :: String, fontStretch :: String, fontStyle :: String, fontVariant :: String, fontWeight :: String, format :: String, from :: String, fx :: String, fy :: String, g1 :: String, g2 :: String, glyphName :: String, glyphOrientationHorizontal :: String, glyphOrientationVertical :: String, glyphRef :: String, gradientTransform :: String, gradientUnits :: String, hanging :: String, height :: String, horizAdvX :: String, horizOriginX :: String, ideographic :: String, imageRendering :: String, in :: String, in2 :: String, intercept :: String, k :: String, k1 :: String, k2 :: String, k3 :: String, k4 :: String, kernelMatrix :: String, kernelUnitLength :: String, kerning :: String, keyPoints :: String, keySplines :: String, keyTimes :: String, lengthAdjust :: String, letterSpacing :: String, lightingColor :: String, limitingConeAngle :: String, local :: String, markerEnd :: String, markerHeight :: String, markerMid :: String, markerStart :: String, markerUnits :: String, markerWidth :: String, mask :: String, maskContentUnits :: String, maskUnits :: String, mathematical :: String, mode :: String, numOctaves :: String, offset :: String, opacity :: String, operator :: String, order :: String, orient :: String, orientation :: String, origin :: String, overflow :: String, overlinePosition :: String, overlineThickness :: String, paintOrder :: String, panose1 :: String, pathLength :: String, patternContentUnits :: String, patternTransform :: String, patternUnits :: String, pointerEvents :: String, points :: String, pointsAtX :: String, pointsAtY :: String, pointsAtZ :: String, preserveAlpha :: String, preserveAspectRatio :: String, primitiveUnits :: String, r :: String, radius :: String, refX :: String, refY :: String, renderingIntent :: String, repeatCount :: String, repeatDur :: String, requiredExtensions :: String, requiredFeatures :: String, restart :: String, result :: String, rotate :: String, rx :: String, ry :: String, scale :: String, seed :: String, shapeRendering :: String, slope :: String, spacing :: String, specularConstant :: String, specularExponent :: String, speed :: String, spreadMethod :: String, startOffset :: String, stdDeviation :: String, stemh :: String, stemv :: String, stitchTiles :: String, stopColor :: String, stopOpacity :: String, strikethroughPosition :: String, strikethroughThickness :: String, string :: String, stroke :: String, strokeDasharray :: String, strokeDashoffset :: String, strokeLinecap :: String, strokeLinejoin :: String, strokeMiterlimit :: String, strokeOpacity :: String, strokeWidth :: String, surfaceScale :: String, systemLanguage :: String, tableValues :: String, targetX :: String, targetY :: String, textAnchor :: String, textDecoration :: String, textLength :: String, textRendering :: String, to :: String, transform :: String, u1 :: String, u2 :: String, underlinePosition :: String, underlineThickness :: String, unicode :: String, unicodeBidi :: String, unicodeRange :: String, unitsPerEm :: String, vAlphabetic :: String, vHanging :: String, vIdeographic :: String, vMathematical :: String, values :: String, vectorEffect :: String, version :: String, vertAdvY :: String, vertOriginX :: String, vertOriginY :: String, viewBox :: String, viewTarget :: String, visibility :: String, width :: String, widths :: String, wordSpacing :: String, writingMode :: String, x :: String, x1 :: String, x2 :: String, xChannelSelector :: String, xHeight :: String, xlinkActuate :: String, xlinkArcrole :: String, xlinkHref :: String, xlinkRole :: String, xlinkShow :: String, xlinkTitle :: String, xlinkType :: String, xmlBase :: String, xmlLang :: String, xmlSpace :: String, xmlns :: String, xmlnsXlink :: String, y :: String, y1 :: String, y2 :: String, yChannelSelector :: String, z :: String, zoomAndPan :: String)
#table Source
table :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_table) => Record attrs -> JSX
#Props_tbody Source
type Props_tbody = (children :: Array JSX)
#tbody Source
tbody :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_tbody) => Record attrs -> JSX
#Props_template Source
type Props_template = (children :: Array JSX)
#template Source
template :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_template) => Record attrs -> JSX
#Props_textarea Source
type Props_textarea = (autoCapitalize :: String, autoCorrect :: String, children :: Array JSX, cols :: Number, defaultValue :: String, disabled :: Boolean, form :: String, name :: String, onChange :: EventHandler, placeholder :: String, required :: Boolean, rows :: Number, value :: String, wrap :: String)
#textarea Source
textarea :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_textarea) => Record attrs -> JSX
#Props_tfoot Source
type Props_tfoot = (children :: Array JSX)
#tfoot Source
tfoot :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_tfoot) => Record attrs -> JSX
#Props_thead Source
type Props_thead = (children :: Array JSX)
#thead Source
thead :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_thead) => Record attrs -> JSX
#Props_time Source
type Props_time = (children :: Array JSX)
#time Source
time :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_time) => Record attrs -> JSX
#Props_title Source
type Props_title = (children :: Array JSX)
#title Source
title :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_title) => Record attrs -> JSX
#Props_track Source
type Props_track = (default :: Boolean, kind :: String, label :: String, src :: String)
#track Source
track :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_track) => Record attrs -> JSX
#video Source
video :: forall attrs_ attrs. Union attrs attrs_ (SharedProps Props_video) => Record attrs -> JSX