From b2e7a1fac1613f63e879b22c577500de0b033fdc Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 5 Feb 2022 19:33:35 +0100 Subject: Added radio --- tpl/index.pug | 15 +++++++++++++++ tpl/objects/radio.pug | 6 ++++++ tpl/objects/text-field.pug | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 tpl/objects/radio.pug (limited to 'tpl') 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 include objects/button.pug include objects/text-field.pug include objects/field-label.pug +include objects/radio.pug mixin box +container(padX=true padY=true inPage=true theme="raised") @@ -199,3 +200,17 @@ html br +field-label('Password', 'At least 6 characters required')(align='right' labelWidth='100px' invalid=true disabled=true) +text-field(placeholder='Placeholder' type='password' invalid=true disabled=true) + + //----------------------------------------- + + +h1-heading(level='xl')= 'Radio' + +rule(level='medium') + + +box + +radio(name="radio-demo-1")= 'Cats' + +radio(name="radio-demo-1")= 'Dogs' + +radio(name="radio-demo-1" checked=true)= 'Foxes' + br + +radio(name="radio-demo-2" disabled=true)= 'Cats' + +radio(name="radio-demo-2" disabled=true)= 'Dogs' + +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 @@ +mixin radio + label.o-radio + input.o-radio__native(type='radio')&attributes(attributes) + .o-radio__circle + .o-radio__label + 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 } div(class=classes aria-disabled=attributes.disabled && String(attributes.disabled)) - input(class='o-text-field__input')&attributes(attributes) + input(class='o-text-field__native')&attributes(attributes) .o-text-field__bg -- cgit v1.2.3-70-g09d2