mirror of https://github.com/status-im/reagent.git
Add material-ui React node property example
This commit is contained in:
parent
355f879ea0
commit
d0812152bc
|
@ -127,7 +127,25 @@
|
|||
;; Same as previous, alternative to adapt-react-class
|
||||
[:> mui/MenuItem
|
||||
{:value 2}
|
||||
"Item 2"]]])
|
||||
"Item 2"]]
|
||||
|
||||
[:> mui/Grid
|
||||
{:container true
|
||||
:direction "row"
|
||||
:spacing 8}
|
||||
|
||||
;; For properties that require React Node as parameter,
|
||||
;; either use r/as-element to convert Reagent hiccup forms into React elements,
|
||||
;; or use r/create-element to directly instantiate element from React class (i.e. non-adapted React component).
|
||||
[:> mui/Grid {:item true}
|
||||
[:> mui/Chip
|
||||
{:icon (r/as-element [:> mui-icons/Face])
|
||||
:label "Icon element example, r/as-element"}]]
|
||||
|
||||
[:> mui/Grid {:item true}
|
||||
[:> mui/Chip
|
||||
{:icon (r/create-element mui-icons/Face)
|
||||
:label "Icon element example, r/create-element"}]]]])
|
||||
|
||||
(defn main []
|
||||
;; fragment
|
||||
|
|
Loading…
Reference in New Issue