Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

alert.vue 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <div class="container">
  3. <!-- eslint-disable max-len -->
  4. <div class="alert mySuccess" v-if="type === 'SUCCESS'">
  5. <eva-icon name="checkmark-outline" style="margin: 0px 20px"></eva-icon>
  6. <strong class="color-black">{{ text }}</strong>
  7. </div>
  8. <div class="alert myInfo" v-if="type === 'INFO'">
  9. <eva-icon name="info-outline" style="margin: 0px 20px"></eva-icon>
  10. <strong class="color-black">{{ text }}</strong>
  11. </div>
  12. <div class="alert myWarning" v-if="type === 'WARNING'">
  13. <eva-icon name="alert-circle-outline" style="margin: 0px 20px"></eva-icon>
  14. <strong class="color-black">{{ text }}</strong>
  15. </div>
  16. <div class="alert myError" v-if="type === 'ERROR'">
  17. <eva-icon name="slash-outline" style="margin: 0px 20px"></eva-icon>
  18. <strong class="color-black">{{ text }}</strong>
  19. </div>
  20. </div>
  21. </template>
  22. <script>
  23. export default {
  24. name: 'Alert',
  25. data() {
  26. return {
  27. alertTypes: {
  28. SUCCESS: 'Success',
  29. INFO: 'Info',
  30. WARNING: 'Warning',
  31. ERROR: 'Error',
  32. },
  33. };
  34. },
  35. props: {
  36. text: null,
  37. type: null,
  38. },
  39. };
  40. </script>
  41. <style>
  42. .color-black {
  43. color: black;
  44. }
  45. </style>