VAlert.vue 944 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <!--
  2. Copyright 2019 Hackware SpA <human@hackware.cl>
  3. This file is part of "Hackware Userland" and licensed under the terms
  4. of the GNU Affero General Public License version 3, or (at your option)
  5. a later version. You should have received a copy of this license along
  6. with the software. If not, see <https://www.gnu.org/licenses/>.
  7. -->
  8. <template>
  9. <div
  10. class="alert alert-dismissible fade show"
  11. :class="`alert-${context}`"
  12. role="alert"
  13. >
  14. <slot />
  15. <button
  16. class="close"
  17. type="button"
  18. data-dismiss="alert"
  19. aria-label="Close"
  20. >
  21. <span aria-hidden="true">&times;</span>
  22. </button>
  23. </div>
  24. </template>
  25. <script>
  26. import 'jquery';
  27. import 'bootstrap/js/dist/util';
  28. import 'bootstrap/js/dist/alert';
  29. export default {
  30. name: 'VAlert',
  31. props: {
  32. context: {
  33. type: String,
  34. default: 'info',
  35. },
  36. },
  37. };
  38. </script>
  39. <style>
  40. .alert a {
  41. @extend .alert-link;
  42. }
  43. </style>