SystemBar.vue 1000 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <!--
  2. System bars
  3. -->
  4. <template>
  5. <div
  6. :class="'alert-bar ' + (onClick ? 'clickable' : '')"
  7. @click="onClick !== undefined ? onClick() : null"
  8. >
  9. <slot>
  10. <v-icon v-if="icon" small :icon="icon" />
  11. {{ text }}
  12. </slot>
  13. </div>
  14. </template>
  15. <script setup lang="ts">
  16. import {useDisplay} from 'vuetify';
  17. const props = defineProps({
  18. text: {
  19. type: String,
  20. required: false,
  21. default: '',
  22. },
  23. icon: {
  24. type: String,
  25. required: false,
  26. default: undefined,
  27. },
  28. onClick: {
  29. type: Function,
  30. required: false,
  31. default: undefined,
  32. },
  33. })
  34. </script>
  35. <style scoped lang="scss">
  36. .alert-bar {
  37. position: relative;
  38. font-size: 14px;
  39. display: flex;
  40. flex-direction: row;
  41. justify-content: center;
  42. align-items: center;
  43. text-align: center;
  44. padding: 12px;
  45. box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
  46. }
  47. .v-icon {
  48. height: 20px;
  49. margin: 0 6px;
  50. }
  51. .clickable {
  52. cursor: pointer;
  53. }
  54. .clickable:hover {
  55. text-decoration: underline;
  56. }
  57. </style>