Skip to content

Instantly share code, notes, and snippets.

@ktquez
Forked from laracasts/Alert.vue
Created May 5, 2016 19:41
Show Gist options
  • Save ktquez/b8a7252deae200813fdaef9ed6a3225b to your computer and use it in GitHub Desktop.
Save ktquez/b8a7252deae200813fdaef9ed6a3225b to your computer and use it in GitHub Desktop.
Alert .vue example.
<template>
<div class="Alert Alert--{{ type | capitalize }}">
<slot></slot>
</div>
</template>
<script>
export default {
props: {
type: {
default: 'info'
}
}
}
</script>
<style lang="sass">
.Alert {
padding: 10px;
}
.Alert--Info {
background: #e3e3e3;
}
.Alert--Success {
background: #8AC48A;
}
.Alert--Error {
background: red;
color: white;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment