Skip to content

Instantly share code, notes, and snippets.

@laracasts
Created March 15, 2016 02:36
Show Gist options
  • Save laracasts/8f78fec0fd65cac7c942 to your computer and use it in GitHub Desktop.
Save laracasts/8f78fec0fd65cac7c942 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>
@hvent90
Copy link

hvent90 commented Mar 16, 2016

bad ass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment