fix(web): add default values to optional vue component props

This commit is contained in:
Pujit Mehrotra
2024-10-17 11:43:44 -04:00
parent 64db2f19a7
commit 38524bce88
7 changed files with 10 additions and 3 deletions

View File

@@ -87,8 +87,8 @@ const { mutate: archive, loading } = useMutation(archiveMutation, {
size="xs"
@click="archive"
>
<ArchiveBoxIcon class="size-3 text-muted-foreground/80 mr-1" />
<span class="text-sm text-muted-foreground mt-0.5">Archive</span>
<ArchiveBoxIcon class="size-3 mr-1" />
<span class="text-sm mt-0.5">Archive</span>
</Button>
</TooltipTrigger>
<TooltipContent>

View File

@@ -12,6 +12,9 @@ interface Props extends PrimitiveProps {
const props = withDefaults(defineProps<Props>(), {
as: 'button',
variant: 'default',
size: 'default',
class: undefined,
})
</script>

View File

@@ -13,6 +13,7 @@ const props = withDefaults(
defineProps<DropdownMenuContentProps & { class?: HTMLAttributes['class'] }>(),
{
sideOffset: 4,
class: undefined,
},
)
const emits = defineEmits<DropdownMenuContentEmits>()

View File

@@ -5,6 +5,7 @@ import { cn } from '@/helpers/utils'
const props = withDefaults(defineProps<ScrollAreaScrollbarProps & { class?: HTMLAttributes['class'] }>(), {
orientation: 'vertical',
class: undefined,
})
const delegatedProps = computed(() => {

View File

@@ -24,6 +24,8 @@ const props = withDefaults(
}>(),
{
position: 'popper',
class: undefined,
to: "#modals",
},
)
const emits = defineEmits<SelectContentEmits>()

View File

@@ -9,6 +9,7 @@ defineOptions({
const props = withDefaults(defineProps<TooltipContentProps & { class?: HTMLAttributes['class'] }>(), {
sideOffset: 4,
class: undefined,
})
const emits = defineEmits<TooltipContentEmits>()

View File

@@ -1,4 +1,3 @@
/* eslint-disable */
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;