From 8988914da1e7dbee152569c805726d7c7244dac2 Mon Sep 17 00:00:00 2001 From: xaralis <filip.varecha@fragaria.cz> Date: Mon, 27 Jul 2020 17:18:42 +0200 Subject: [PATCH] Add textarea --- .../15-form-fields/12-password-input.mustache | 1 + .../00-atoms/15-form-fields/13-textarea.mustache | 1 + .../15-form-fields/14-textarea-disabled.mustache | 1 + .../00-atoms/15-form-fields/password-input.mustache | 1 - .../14-form-fields/textarea-field.mustache | 12 ++++++++++++ source/_patterns/02-organisms/07-forms/form.mustache | 1 + 6 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 source/_patterns/00-atoms/15-form-fields/12-password-input.mustache create mode 100644 source/_patterns/00-atoms/15-form-fields/13-textarea.mustache create mode 100644 source/_patterns/00-atoms/15-form-fields/14-textarea-disabled.mustache delete mode 100644 source/_patterns/00-atoms/15-form-fields/password-input.mustache create mode 100644 source/_patterns/01-molecules/14-form-fields/textarea-field.mustache diff --git a/source/_patterns/00-atoms/15-form-fields/12-password-input.mustache b/source/_patterns/00-atoms/15-form-fields/12-password-input.mustache new file mode 100644 index 0000000..d6d270a --- /dev/null +++ b/source/_patterns/00-atoms/15-form-fields/12-password-input.mustache @@ -0,0 +1 @@ +<input type="password" class="text-input text-input--password form-field__control" value="" placeholder="{{ placeholder }}{{^ placeholder }}* * * * * * *{{/ placeholder }}" /> diff --git a/source/_patterns/00-atoms/15-form-fields/13-textarea.mustache b/source/_patterns/00-atoms/15-form-fields/13-textarea.mustache new file mode 100644 index 0000000..0e5eb88 --- /dev/null +++ b/source/_patterns/00-atoms/15-form-fields/13-textarea.mustache @@ -0,0 +1 @@ +<textarea class="text-input form-field__control {{ classes }}" value="" rows="10" cols="40" placeholder="{{ placeholder }}{{^ placeholder }}{{ form.placeholder }}{{/ placeholder }}" {{# disabled }}disabled{{/ disabled }} {{# readonly }}readonly{{/ readonly }}></textarea> diff --git a/source/_patterns/00-atoms/15-form-fields/14-textarea-disabled.mustache b/source/_patterns/00-atoms/15-form-fields/14-textarea-disabled.mustache new file mode 100644 index 0000000..f407225 --- /dev/null +++ b/source/_patterns/00-atoms/15-form-fields/14-textarea-disabled.mustache @@ -0,0 +1 @@ +{{> atoms-textarea(disabled: true) }} diff --git a/source/_patterns/00-atoms/15-form-fields/password-input.mustache b/source/_patterns/00-atoms/15-form-fields/password-input.mustache deleted file mode 100644 index 17a64b0..0000000 --- a/source/_patterns/00-atoms/15-form-fields/password-input.mustache +++ /dev/null @@ -1 +0,0 @@ -<input type="password" class="text-input form-field__control" value="" placeholder="{{ placeholder }}{{^ placeholder }}{{ form.placeholder }}{{/ placeholder }}" /> diff --git a/source/_patterns/01-molecules/14-form-fields/textarea-field.mustache b/source/_patterns/01-molecules/14-form-fields/textarea-field.mustache new file mode 100644 index 0000000..9363874 --- /dev/null +++ b/source/_patterns/01-molecules/14-form-fields/textarea-field.mustache @@ -0,0 +1,12 @@ +<div class="form-field {{# error }}form-field--error{{/ error }} {{ classes }}"> + <label class="form-field__label" for="field">{{ label }}{{^ label }}{{ form.label }}{{/ label }}</label> + <div class="form-field__wrapper form-field__wrapper--shadowed"> + {{> atoms-textarea }} + </div> + {{# error }} + <div class="form-field__error">{{ error }}</div> + {{/ error }} + {{# help }} + <div class="form-field__help-text">{{ help }}</div> + {{/ help }} +</div> diff --git a/source/_patterns/02-organisms/07-forms/form.mustache b/source/_patterns/02-organisms/07-forms/form.mustache index 470c360..a5a220a 100644 --- a/source/_patterns/02-organisms/07-forms/form.mustache +++ b/source/_patterns/02-organisms/07-forms/form.mustache @@ -7,5 +7,6 @@ {{> molecules-radio-field(classes: "col-span-1", wrapperClasses: "form-field__wrapper--col-items") }} {{> molecules-select-field(classes: "col-span-2") }} {{> molecules-select-field(classes: "col-span-2") }} + {{> molecules-textarea-field(classes: "col-span-4") }} {{> atoms-button(classes: "col-span-2 text-lg max-w-full btn--black-100", cta: "Odeslat") }} </div> -- GitLab