1
0

feat: use withDefaults for Card

This commit is contained in:
Dominik Pschenitschni 2024-06-26 20:33:31 +02:00 committed by konrad
parent 7c9f0b8ada
commit 5b0ce4e01c

View File

@ -44,40 +44,26 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import type {PropType} from 'vue'
import type {IconProp} from '@fortawesome/fontawesome-svg-core' import type {IconProp} from '@fortawesome/fontawesome-svg-core'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
defineProps({ withDefaults(defineProps<{
title: { title?: string
type: String, padding?: boolean
default: '', hasClose?: boolean
}, closeIcon?: IconProp
padding: { shadow?: boolean
type: Boolean, hasContent?: boolean
default: true, loading?: boolean
}, }>(), {
hasClose: { title: '',
type: Boolean, padding: true,
default: false, hasClose: false,
}, closeIcon: 'times',
closeIcon: { shadow: true,
type: String as PropType<IconProp>, hasContent: true,
default: 'times', loading: false,
},
shadow: {
type: Boolean,
default: true,
},
hasContent: {
type: Boolean,
default: true,
},
loading: {
type: Boolean,
default: false,
},
}) })
defineEmits(['close']) defineEmits(['close'])