-
Notifications
You must be signed in to change notification settings - Fork 41
/
Internal.purs
97 lines (92 loc) · 3.02 KB
/
Internal.purs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
module React.Basic.DOM.Internal where
import React.Basic (ReactComponent)
import React.Basic.Events (EventHandler)
import Unsafe.Coerce (unsafeCoerce)
-- | An abstract type representing records of CSS attributes.
foreign import data CSS :: Type
-- | Standard props which are shared by all DOM elements.
type SharedProps specific =
-- | `key` is not really a DOM attribute - React intercepts it
( key :: String
, about :: String
, acceptCharset :: String
, accessKey :: String
, allowFullScreen :: Boolean
, allowTransparency :: String
, autoComplete :: String
, autoFocus :: String
, autoPlay :: Boolean
, capture :: Boolean
, cellPadding :: String
, cellSpacing :: String
, charSet :: String
, classID :: String
, className :: String
, colSpan :: Number
, contentEditable :: String
, contextMenu :: String
, crossOrigin :: String
, datatype :: String
, dateTime :: String
, dir :: String
, draggable :: String
, encType :: String
, formAction :: String
, formEncType :: String
, formMethod :: String
, formNoValidate :: String
, formTarget :: String
, frameBorder :: String
, hidden :: Boolean
, hrefLang :: String
, htmlFor :: String
, httpEquiv :: String
, icon :: String
, id :: String
, inlist :: String
, inputMode :: String
, is :: String
, itemID :: String
, itemProp :: String
, itemRef :: String
, itemScope :: Boolean
, itemType :: String
, keyParams :: String
, keyType :: String
, lang :: String
, marginHeight :: String
, marginWidth :: String
, maxLength :: String
, mediaGroup :: String
, minLength :: String
, noValidate :: String
, prefix :: String
, property :: String
, radioGroup :: String
, readOnly :: Boolean
, resource :: String
, role :: String
, rowSpan :: Number
, scoped :: Boolean
, seamless :: Boolean
, security :: String
, spellCheck :: String
, srcDoc :: String
, srcLang :: String
, srcSet :: String
, style :: CSS
, tabIndex :: String
, title :: String
, typeof :: String
, unselectable :: String
, useMap :: String
, vocab :: String
, wmode :: String
, onBlur :: EventHandler
, onClick :: EventHandler
, onFocus :: EventHandler
-- TODO: add more common event handlers
| specific
)
unsafeCreateDOMComponent :: forall props. String -> ReactComponent props
unsafeCreateDOMComponent = unsafeCoerce