1
0

feat: use withDefaults in CreateEdit

This commit is contained in:
Dominik Pschenitschni 2024-06-15 14:39:03 +02:00 committed by konrad
parent a80ac571f2
commit 5e4b9e38a6

View File

@ -50,41 +50,25 @@
</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'
defineProps({ withDefaults(defineProps<{
title: { title: string,
type: String, primaryLabel?: string,
default: '', primaryIcon?: IconProp,
}, primaryDisabled?: boolean,
primaryLabel: { hasPrimaryAction?: boolean,
type: String, tertiary?: string,
}, wide?: boolean,
primaryIcon: { loading?: boolean
type: String as PropType<IconProp>, }>(), {
default: 'plus', primaryLabel: '',
}, primaryIcon: 'plus',
primaryDisabled: { primaryDisabled: false,
type: Boolean, hasPrimaryAction: true,
default: false, tertiary: '',
}, wide: false,
hasPrimaryAction: { loading: false,
type: Boolean,
default: true,
},
tertiary: {
type: String,
default: '',
},
wide: {
type: Boolean,
default: false,
},
loading: {
type: Boolean,
default: false,
},
}) })
const emit = defineEmits(['create', 'primary', 'tertiary']) const emit = defineEmits(['create', 'primary', 'tertiary'])