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)) (element-children element))
(defmethod expand-component ((element component)) (defmethod expand-component ((element component))
(with-slots (type props children) element (apply (element-type element) (element-props-with-children element)))
(apply type (merge-children-into-props props children))))
(defun merge-children-into-props (props children) (defmethod element-props-with-children ((element component))
(append props (with-slots (props children) element
(and children (append props (and children (list :children children)))))
(list :children children))))