summaryrefslogtreecommitdiffstats
path: root/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'tpl')
-rw-r--r--tpl/objects/text-field.pug52
1 files changed, 26 insertions, 26 deletions
diff --git a/tpl/objects/text-field.pug b/tpl/objects/text-field.pug
index d33d3b2..2e9827b 100644
--- a/tpl/objects/text-field.pug
+++ b/tpl/objects/text-field.pug
@@ -1,33 +1,33 @@
1include icon.pug 1include icon.pug
2 2
3mixin text-field 3mixin text-field
4 - const slots = {} 4 - const slots = {}
5 5
6 mixin slot(key) 6 mixin slot(key)
7 - slots[key] = block 7 - slots[key] = block
8 8
9 - 9 -
10 block ? block() : undefined 10 block ? block() : undefined
11 11
12 let classes = { 12 let classes = {
13 'o-text-field': true, 13 'o-text-field': true,
14 'o-text-field--ext': attributes.ext, 14 'o-text-field--ext': attributes.ext,
15 'is-invalid': attributes.invalid, 15 'is-invalid': attributes.invalid,
16 'is-disabled': attributes.disabled, 16 'is-disabled': attributes.disabled,
17 'l-card': !!block, 17 'l-card': !!block,
18 'l-card--flush': !!block, 18 'l-card--flush': !!block,
19 'l-card--gapless': !!block, 19 'l-card--gapless': !!block,
20 'u-p-xs': !!block 20 'u-p-xs': !!block
21 } 21 }
22 22
23 div(class=classes aria-disabled=attributes.disabled && String(attributes.disabled)) 23 div(class=classes aria-disabled=attributes.disabled && String(attributes.disabled))
24 if !!block 24 if !!block
25 if slots.pre 25 if slots.pre
26 - slots.pre() 26 - slots.pre()
27 input.o-text-field__native.l-card__block.l-card__block--main&attributes(attributes) 27 input.o-text-field__native.l-card__block.l-card__block--main&attributes(attributes)
28 if slots.post 28 if slots.post
29 - slots.post() 29 - slots.post()
30 .o-text-field__bg 30 .o-text-field__bg
31 else 31 else
32 input.o-text-field__native&attributes(attributes) 32 input.o-text-field__native&attributes(attributes)
33 .o-text-field__bg 33 .o-text-field__bg