summaryrefslogtreecommitdiffstats
path: root/tpl/objects
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/objects')
-rw-r--r--tpl/objects/icon.pug7
-rw-r--r--tpl/objects/text-field.pug13
2 files changed, 20 insertions, 0 deletions
diff --git a/tpl/objects/icon.pug b/tpl/objects/icon.pug
new file mode 100644
index 0000000..a77a3ed
--- /dev/null
+++ b/tpl/objects/icon.pug
@@ -0,0 +1,7 @@
1mixin icon(id)
2 -
3 let href = '../node_modules/iro-icons/src/icons/' + id + '.svg'
4 let classes = attributes.class ? attributes.class : ''
5
6 svg(class=['o-icon', 'o-icon--iro', 'o-icon--iro-' + id, classes] width='1em' height='1em')
7 use(xlink:href=href)
diff --git a/tpl/objects/text-field.pug b/tpl/objects/text-field.pug
new file mode 100644
index 0000000..9bbe0a1
--- /dev/null
+++ b/tpl/objects/text-field.pug
@@ -0,0 +1,13 @@
1include icon.pug
2
3mixin text-field
4 -
5 let classes = {
6 'o-text-field': true,
7 'is-invalid': attributes.invalid,
8 'is-disabled': attributes.disabled,
9 }
10
11 div(class=classes)
12 input(class='o-text-field__input')&attributes(attributes)
13 .o-text-field__bg