UiCard.vue 490 B

12345678910111213141516171819202122232425262728
  1. <template>
  2. <component
  3. :is="tag"
  4. v-bind="$attrs"
  5. class="bg-white dark:bg-gray-800 transform rounded-lg ui-card"
  6. :class="[padding, { 'hover:shadow-xl hover:-translate-y-1': hover }]"
  7. >
  8. <slot></slot>
  9. </component>
  10. </template>
  11. <script>
  12. export default {
  13. props: {
  14. hover: {
  15. type: Boolean,
  16. default: false,
  17. },
  18. padding: {
  19. type: String,
  20. default: 'p-4',
  21. },
  22. tag: {
  23. type: String,
  24. default: 'div',
  25. },
  26. },
  27. };
  28. </script>