Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

@hvent90 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