diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-12 03:11:52 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-12 03:11:52 +0200 |
commit | 12dc92b8fb1eb2fe81d95d315afde9e84e1174b1 (patch) | |
tree | 8631711501e7c52d600fb5f6c9f9127d8e94a999 | |
parent | Stop using with-label. (diff) | |
download | calp-12dc92b8fb1eb2fe81d95d315afde9e84e1174b1.tar.gz calp-12dc92b8fb1eb2fe81d95d315afde9e84e1174b1.tar.xz |
Remove with-label.
-rw-r--r-- | module/calp/html/components.scm | 20 | ||||
-rw-r--r-- | tests/test/html/component.scm | 1 |
2 files changed, 0 insertions, 21 deletions
diff --git a/module/calp/html/components.scm b/module/calp/html/components.scm index 6ff59502..a36dbef9 100644 --- a/module/calp/html/components.scm +++ b/module/calp/html/components.scm @@ -110,26 +110,6 @@ ,@inner-body)])) -(define-public (with-label lbl . forms) - - (define id (gensym "label")) - - (cons `(label (@ (for ,id)) ,lbl) - (let recurse ((forms forms)) - (map (lambda (form) - (cond [(not (list? form)) form] - [(null? form) '()] - [(eq? 'input (car form)) - ((set-attribute `((id ,id))) form)] - [(list? (car form)) - (cons (recurse (car form)) - (recurse (cdr form)))] - [else - (cons (car form) - (recurse (cdr form)))])) - forms)))) - - (define-public (include-css path . extra-attributes) `(link (@ (type "text/css") (rel "stylesheet") diff --git a/tests/test/html/component.scm b/tests/test/html/component.scm index 050810be..7d17be7f 100644 --- a/tests/test/html/component.scm +++ b/tests/test/html/component.scm @@ -23,7 +23,6 @@ (btn class: '("test") "body")) ;; tabset -;; with-label (test-equal '(link (@ (type "text/css") (rel "stylesheet") (href "style.css"))) (include-css "style.css")) |