From ea8b0bc19219f6f931e3be757c25743c2c828b2e Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 6 Feb 2022 10:28:10 +0100 Subject: Added checkbox and switch --- tpl/objects/checkbox.pug | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tpl/objects/checkbox.pug (limited to 'tpl/objects/checkbox.pug') diff --git a/tpl/objects/checkbox.pug b/tpl/objects/checkbox.pug new file mode 100644 index 0000000..874505b --- /dev/null +++ b/tpl/objects/checkbox.pug @@ -0,0 +1,18 @@ +include icon.pug + +mixin checkbox + - + let classes = { + 'o-checkbox': true, + 'o-checkbox--accent': attributes.accent, + } + + label(class=classes) + input.o-checkbox__native( + type='checkbox' + class={ 'is-indeterminate': attributes.indeterminate } + )&attributes(attributes) + .o-checkbox__box + +icon('check')(class='o-checkbox__check-icon') + .o-checkbox__label + block -- cgit v1.2.3-54-g00ecf