New sxc/ content tree with 120 page files across docs, examples, home, and reference demos. sx/sx/testing/ adds page-runner.sx (317L) and index-runner.sx (394L) — SX-native test runner pages for browser-based evaluation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
(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"))))
|