Last active
July 12, 2019 07:38
-
-
Save jimmycrequer/91896c7dfc735ec930854a2c37f21745 to your computer and use it in GitHub Desktop.
Slots
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="wrapper" :class="level"> | |
<slot></slot> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: { | |
level: { type: String, default: 'error' } | |
} | |
} | |
</script> | |
<style scoped> | |
.wrapper { border-radius: 5px; margin: 5px; padding: 10px; } | |
.right { float: right; } | |
.info { color: #004085; background-color: #cce5ff; border: 1px solid #b8daff; } | |
.warn { color: #856404; background-color: #fff3cd; border: 1px solid #ffeeba; } | |
.error { color: #721c24; background-color: #f8d7da; border: 1px solid #f5c6cb; } | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment