From 1cb77f7c4cb27e40e368656b6536bb208d96aef9 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 5 Feb 2022 18:32:31 +0100 Subject: Added text field --- tpl/objects/icon.pug | 7 +++++++ tpl/objects/text-field.pug | 13 +++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tpl/objects/icon.pug create mode 100644 tpl/objects/text-field.pug (limited to 'tpl/objects') 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 @@ +mixin icon(id) + - + let href = '../node_modules/iro-icons/src/icons/' + id + '.svg' + let classes = attributes.class ? attributes.class : '' + + svg(class=['o-icon', 'o-icon--iro', 'o-icon--iro-' + id, classes] width='1em' height='1em') + 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 @@ +include icon.pug + +mixin text-field + - + let classes = { + 'o-text-field': true, + 'is-invalid': attributes.invalid, + 'is-disabled': attributes.disabled, + } + + div(class=classes) + input(class='o-text-field__input')&attributes(attributes) + .o-text-field__bg -- cgit v1.2.3-54-g00ecf