diff options
author | Volpeon <git@volpeon.ink> | 2022-02-05 18:32:31 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-02-05 18:32:31 +0100 |
commit | 1cb77f7c4cb27e40e368656b6536bb208d96aef9 (patch) | |
tree | f2e21f92a50c78895473d998811488fdb96cfec3 /tpl/objects | |
parent | Added button (diff) | |
download | iro-design-1cb77f7c4cb27e40e368656b6536bb208d96aef9.tar.gz iro-design-1cb77f7c4cb27e40e368656b6536bb208d96aef9.tar.bz2 iro-design-1cb77f7c4cb27e40e368656b6536bb208d96aef9.zip |
Added text field
Diffstat (limited to 'tpl/objects')
-rw-r--r-- | tpl/objects/icon.pug | 7 | ||||
-rw-r--r-- | tpl/objects/text-field.pug | 13 |
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 @@ | |||
1 | mixin 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 @@ | |||
1 | include icon.pug | ||
2 | |||
3 | mixin 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 | ||