trying to add a textinput component

This commit is contained in:
Andrew Croce 2018-08-07 13:42:29 -04:00
parent 7da306047f
commit 3f752280f2
3 changed files with 22 additions and 10 deletions

View File

@ -0,0 +1,3 @@
export default {
name: 'textinput'
}

View File

@ -1,6 +1,12 @@
import classes from '../styles/atat.scss' import classes from '../styles/atat.scss'
import Vue from 'vue/dist/vue' import Vue from 'vue/dist/vue'
import TextInput from './components/text_input'
const components = {
TextInput
}
const app = new Vue({ const app = new Vue({
el: '#app-root', el: '#app-root',
methods: { methods: {
@ -17,5 +23,6 @@ const app = new Vue({
styleguideModal: false, styleguideModal: false,
} }
} }
} },
components: components
}) })

View File

@ -130,15 +130,17 @@
<form> <form>
<div class='usa-input'> <TextInput inline-template>
<label for='basic-text-1'> <div class='usa-input'>
Basic Text Input <label for='basic-text-1'>
<span class='usa-input__help'> Basic Text Input
This is some help text to explain what this form field is and why you should fill it out. <span class='usa-input__help'>
</span> This is some help text to explain what this form field is and why you should fill it out.
</label> </span>
<input id='basic-text-1' type='text' placeholder='this is a sample of what you should enter'/> </label>
</div> <input id='basic-text-1' type='text' placeholder='this is a sample of what you should enter'/>
</div>
</TextInput>
<div class='usa-input usa-input--error'> <div class='usa-input usa-input--error'>
<label for='basic-text-2'> <label for='basic-text-2'>