chore(components): update props with optional fields (#118)

This commit is contained in:
Sylvain Marroufin
2022-12-01 13:01:45 +01:00
committed by GitHub
parent 2535301bcd
commit 5042b5806b
2 changed files with 5 additions and 2 deletions

View File

@@ -54,8 +54,8 @@ import $ui from '#build/ui'
const props = defineProps({
items: {
type: Array as PropType<{
to: RouteLocationNormalized
exact: boolean
to?: RouteLocationNormalized
exact?: boolean
label: string
disabled?: boolean
slot?: string

View File

@@ -39,6 +39,7 @@
<script setup lang="ts">
import type { PropType } from 'vue'
import type { RouteLocationNormalized } from 'vue-router'
import Icon from '../elements/Icon.vue'
import Link from '../elements/Link.vue'
import Avatar from '../elements/Avatar.vue'
@@ -48,6 +49,8 @@ import $ui from '#build/ui'
defineProps({
links: {
type: Array as PropType<{
to?: RouteLocationNormalized
exact?: boolean
label: string
icon?: string
iconClass?: string