From 12dc92b8fb1eb2fe81d95d315afde9e84e1174b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 12 Jun 2022 03:11:52 +0200 Subject: Remove with-label. --- module/calp/html/components.scm | 20 -------------------- tests/test/html/component.scm | 1 - 2 files changed, 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")) -- cgit v1.2.3