(defcomp (&key id name price stock) (tr :id (str "erow-" id) (~tw :tokens "border-b border-stone-100 bg-violet-50") (td (~tw :tokens "px-3 py-2") (input :type "text" :name "name" :value name (~tw :tokens "w-full px-2 py-1 border border-stone-300 rounded text-sm"))) (td (~tw :tokens "px-3 py-2") (input :type "text" :name "price" :value price (~tw :tokens "w-20 px-2 py-1 border border-stone-300 rounded text-sm"))) (td (~tw :tokens "px-3 py-2") (input :type "text" :name "stock" :value stock (~tw :tokens "w-20 px-2 py-1 border border-stone-300 rounded text-sm"))) (td (~tw :tokens "px-3 py-2 space-x-1") (button :sx-post (str "/sx/(geography.(hypermedia.(example.(api.(editrow." id ")))))") :sx-target (str "#erow-" id) :sx-swap "outerHTML" :sx-include (str "#erow-" id) (~tw :tokens "text-sm text-emerald-600 hover:text-emerald-800") "save") (button :sx-get (str "/sx/(geography.(hypermedia.(example.(api.(editrow-cancel." id ")))))") :sx-target (str "#erow-" id) :sx-swap "outerHTML" (~tw :tokens "text-sm text-stone-500 hover:text-stone-700") "cancel"))))