Add element-props-with-children method

This commit is contained in:
paku 2024-06-09 22:37:51 +09:00
parent d3c487f55e
commit 9745dc6788

View file

@ -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)))))