Add element-props-with-children method
This commit is contained in:
parent
d3c487f55e
commit
9745dc6788
1 changed files with 4 additions and 6 deletions
|
@ -139,10 +139,8 @@
|
|||
(element-children element))
|
||||
|
||||
(defmethod expand-component ((element component))
|
||||
(with-slots (type props children) element
|
||||
(apply type (merge-children-into-props props children))))
|
||||
(apply (element-type element) (element-props-with-children element)))
|
||||
|
||||
(defun merge-children-into-props (props children)
|
||||
(append props
|
||||
(and children
|
||||
(list :children children))))
|
||||
(defmethod element-props-with-children ((element component))
|
||||
(with-slots (props children) element
|
||||
(append props (and children (list :children children)))))
|
||||
|
|
Loading…
Reference in a new issue