Skip to content

Commit

Permalink
Add Alert Message nayarahilton#1
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasjs committed Nov 14, 2017
1 parent ffe71df commit 0ec8618
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions src/components/AlertMessage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<template>
<div
:class="alertStyle"
class="alert"
>
<span class="alert__text">
{{ msgText }}
</span>
</div>
</template>

<script>
export default {
props: {
msgText: {
required: true,
type: String,
},
design: {
type: String,
},
},
computed: {
alertStyle() {
if (this.design === 'main' || !this.design) return 'alert--main';
if (this.design === 'danger') return 'alert--center';
},
},
};
</script>

<style lang="stylus" scoped>
@import '../assets/styles/_colors'
*
box-sizing border-box
.titles
background transparent
margin-bottom 20px
padding 15px
width 100%
&--left
color
&--danger
color red
&--sucess
color green
&__text
font-size 12pt
font-weight 300
margin 0
</style>

0 comments on commit 0ec8618

Please sign in to comment.