Skip to content

Commit

Permalink
Edit components nayarahilton#1
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasjs committed Dec 1, 2017
1 parent 6391f7e commit 04da492
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 16 deletions.
41 changes: 26 additions & 15 deletions src/components/FeedbackMessage.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<template>
<div
<span
class="feedback"
>
<span class="feedback__text">
{{ msgText }}
</span>
</div>
:class="feedbackStyle"
>
{{ msgText }}
</span>
</template>

<script>
Expand All @@ -14,7 +13,16 @@ export default {
msgText: {
required: true,
type: String,
},
},
design: {
type: String,
},
},
computed: {
feedbackStyle() {
if (this.design === 'main' || !this.design) return 'feedback--main';
if (this.design === 'login') return 'feedback--login';
},
},
};
</script>
Expand All @@ -27,14 +35,17 @@ export default {
.feedback
background transparent
font-size 14pt
font-weight 600
margin-bottom 20px
padding 15px
padding 0
width 100%
&__text
color red
font-size 12pt
font-weight 300
margin 0
text-align center
</style>
&--login
color lightness(red, 70%)
text-align center
&--main
color red
text-align left
</style>
2 changes: 1 addition & 1 deletion src/components/MainInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export default {
inputStyle() {
if (this.design === 'main' || !this.design) return 'input--main';
if (this.design === 'login') return 'input--login';
if (this.design === 'invalid') return 'input--invalid';
},
},
methods: {
Expand Down Expand Up @@ -80,4 +79,5 @@ export default {
&--invalid
border-color red
background rgba(255, 0, 0, 0.20);
</style>
11 changes: 11 additions & 0 deletions src/components/MainTextarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
:class="textareaStyle"
class="textarea"
rows="4"
ref="input"
v-bind:value="value"
v-on:input="updateValue($event.target.value)"
/>
</template>

Expand All @@ -18,6 +21,9 @@ export default {
id: {
type: String,
},
value: {
type: String,
},
placeholder: {
required: true,
type: String,
Expand All @@ -31,6 +37,11 @@ export default {
if (this.design === 'main' || !this.design) return 'textarea--main';
},
},
methods: {
updateValue(value) {
this.$emit('input', value);
},
},
};
</script>

Expand Down

0 comments on commit 04da492

Please sign in to comment.