summaryrefslogtreecommitdiffstats
path: root/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'tpl')
-rw-r--r--tpl/index.pug15
-rw-r--r--tpl/objects/radio.pug6
-rw-r--r--tpl/objects/text-field.pug2
3 files changed, 22 insertions, 1 deletions
diff --git a/tpl/index.pug b/tpl/index.pug
index e3918de..93c2057 100644
--- a/tpl/index.pug
+++ b/tpl/index.pug
@@ -8,6 +8,7 @@ include objects/rule.pug
8include objects/button.pug 8include objects/button.pug
9include objects/text-field.pug 9include objects/text-field.pug
10include objects/field-label.pug 10include objects/field-label.pug
11include objects/radio.pug
11 12
12mixin box 13mixin box
13 +container(padX=true padY=true inPage=true theme="raised") 14 +container(padX=true padY=true inPage=true theme="raised")
@@ -199,3 +200,17 @@ html
199 br 200 br
200 +field-label('Password', 'At least 6 characters required')(align='right' labelWidth='100px' invalid=true disabled=true) 201 +field-label('Password', 'At least 6 characters required')(align='right' labelWidth='100px' invalid=true disabled=true)
201 +text-field(placeholder='Placeholder' type='password' invalid=true disabled=true) 202 +text-field(placeholder='Placeholder' type='password' invalid=true disabled=true)
203
204 //-----------------------------------------
205
206 +h1-heading(level='xl')= 'Radio'
207 +rule(level='medium')
208
209 +box
210 +radio(name="radio-demo-1")= 'Cats'
211 +radio(name="radio-demo-1")= 'Dogs'
212 +radio(name="radio-demo-1" checked=true)= 'Foxes'
213 br
214 +radio(name="radio-demo-2" disabled=true)= 'Cats'
215 +radio(name="radio-demo-2" disabled=true)= 'Dogs'
216 +radio(name="radio-demo-2" checked=true disabled=true)= 'Foxes'
diff --git a/tpl/objects/radio.pug b/tpl/objects/radio.pug
new file mode 100644
index 0000000..da6a026
--- /dev/null
+++ b/tpl/objects/radio.pug
@@ -0,0 +1,6 @@
1mixin radio
2 label.o-radio
3 input.o-radio__native(type='radio')&attributes(attributes)
4 .o-radio__circle
5 .o-radio__label
6 block
diff --git a/tpl/objects/text-field.pug b/tpl/objects/text-field.pug
index 9069200..c933b69 100644
--- a/tpl/objects/text-field.pug
+++ b/tpl/objects/text-field.pug
@@ -9,5 +9,5 @@ mixin text-field
9 } 9 }
10 10
11 div(class=classes aria-disabled=attributes.disabled && String(attributes.disabled)) 11 div(class=classes aria-disabled=attributes.disabled && String(attributes.disabled))
12 input(class='o-text-field__input')&attributes(attributes) 12 input(class='o-text-field__native')&attributes(attributes)
13 .o-text-field__bg 13 .o-text-field__bg