Skip to content

Commit

Permalink
Add shared xml namespace props
Browse files Browse the repository at this point in the history
  • Loading branch information
megamaddu committed Aug 2, 2019
1 parent 3106c92 commit 0b45890
Showing 1 changed file with 30 additions and 17 deletions.
47 changes: 30 additions & 17 deletions src/React/Basic/DOM/Internal.purs
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,36 @@ foreign import data CSS :: Type
-- The string props are from MDN, and the
-- event handlers are the same as in SharedProps
-- (the same events should work for SVG elements)
type SharedSVGProps specific =
( id :: String
, className :: String
, style :: CSS
, tabIndex :: String
, onBlur :: EventHandler
, onClick :: EventHandler
, onFocus :: EventHandler
, onMouseDown :: EventHandler
, onMouseEnter :: EventHandler
, onMouseLeave :: EventHandler
, onMouseMove :: EventHandler
, onMouseOut :: EventHandler
, onMouseOver :: EventHandler
, onMouseUp :: EventHandler
| specific
)
type SharedSVGProps specific
= ( id :: String
, className :: String
, style :: CSS
, tabIndex :: String
, lang :: 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
, onBlur :: EventHandler
, onClick :: EventHandler
, onFocus :: EventHandler
, onMouseDown :: EventHandler
, onMouseEnter :: EventHandler
, onMouseLeave :: EventHandler
, onMouseMove :: EventHandler
, onMouseOut :: EventHandler
, onMouseOver :: EventHandler
, onMouseUp :: EventHandler
| specific
)

unsafeCreateDOMComponent :: forall props. String -> ReactComponent props
unsafeCreateDOMComponent = unsafeCoerce

0 comments on commit 0b45890

Please sign in to comment.