refactor to ui components
This commit is contained in:
15
src/components/ui/UITable.vue
Normal file
15
src/components/ui/UITable.vue
Normal file
@@ -0,0 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
interface Props {
|
||||
density?: 'compact'
|
||||
}
|
||||
const props = defineProps<Props>()
|
||||
|
||||
const styleClass = computed(() => {
|
||||
const densityClass = props.density ? 'table-compact' : ''
|
||||
return [densityClass]
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<table class="table" :class="styleClass"><slot></slot></table>
|
||||
</template>
|
||||
Reference in New Issue
Block a user