diff options
-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")) |