Add vue stuff to sample styleguide input

This commit is contained in:
Andrew Croce 2018-08-08 10:59:14 -04:00
parent bed396131a
commit f48a878beb

View File

@ -130,24 +130,27 @@
<form> <form>
<textinput inline-template> <textinput inline-template validation='dollars' value='1231231'>
<div class='usa-input'> <div v-bind:class="['usa-input usa-input--validation--' + validation, { 'usa-input--error': showError, 'usa-input--success': showValid }]">
<label for='basic-text-1'> <label for='basic-text-1'>
Basic Text Input Dollars Text Input
<span class='usa-input__help'> <span class='usa-input__help'>
This is some help text to explain what this form field is and why you should fill it out. This is some help text to explain what this form field is and why you should fill it out.
</span> </span>
<template v-if='showError'>{{ Icon('alert') }}</template>
<template v-if='showValid'>{{ Icon('ok') }}</template>
</label> </label>
<masked-input <masked-input
v-on:input='onInput' v-on:input='onInput'
v-on:change='onChange' v-on:change='onChange'
v-model='value'
id='basic-text-1' id='basic-text-1'
type='text' type='text'
placeholder='this is a sample of what you should enter' ref='input'
placeholder='$'
:guide="true"
:mask="mask"> :mask="mask">
</masked-input> </masked-input>
<div v-if='showError'>Error</div>
<div v-if='showValid'>Valid</div>
</div> </div>
</textinput> </textinput>