You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.4 KiB

  1. <template lang='pug'>
  2. .v-card-info(:class='`is-` + color')
  3. v-card-text.d-flex.align-center(:class='colors.cls')
  4. v-icon(:color='colors.icon', left) {{icon}}
  5. slot
  6. </template>
  7. <script>
  8. export default {
  9. props: {
  10. color: {
  11. type: String,
  12. default: 'blue'
  13. },
  14. icon: {
  15. type: String,
  16. default: 'mdi-information-outline'
  17. }
  18. },
  19. computed: {
  20. colors () {
  21. switch (this.color) {
  22. case 'blue':
  23. return {
  24. cls: this.$vuetify.theme.dark ? 'grey darken-4-l5 blue--text text--lighten-4' : 'blue lighten-5 blue--text text--darken-3',
  25. icon: 'blue lighten-3'
  26. }
  27. case 'red':
  28. return {
  29. cls: this.$vuetify.theme.dark ? 'grey darken-4-l5 red--text text--lighten-4' : 'red lighten-5 red--text text--darken-2',
  30. icon: 'red lighten-3'
  31. }
  32. default:
  33. return {
  34. cls: this.$vuetify.theme.dark ? 'grey darken-4-l5' : 'grey lighten-4',
  35. icon: 'grey darken-2'
  36. }
  37. }
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="scss">
  43. .v-card-info {
  44. border-bottom: 1px solid #EEE;
  45. &.is-blue {
  46. border-bottom-color: mc('blue', '100');
  47. @at-root .theme--dark & {
  48. border-bottom-color: rgba(mc('blue', '100'), .3);
  49. }
  50. }
  51. &.is-red {
  52. border-bottom-color: mc('red', '100');
  53. @at-root .theme--dark & {
  54. border-bottom-color: rgba(mc('red', '100'), .3);
  55. }
  56. }
  57. }
  58. </style>