Added ui card to add worlds / calendars
This commit is contained in:
@@ -5,7 +5,10 @@ import { cn } from "@/lib/utils"
|
||||
const props = defineProps<{
|
||||
class?: HTMLAttributes["class"]
|
||||
link?: string
|
||||
hasClick?: boolean
|
||||
}>()
|
||||
|
||||
const emit = defineEmits(["on-click"])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -13,7 +16,7 @@ const props = defineProps<{
|
||||
:class="
|
||||
cn('rounded-lg border bg-card text-card-foreground shadow-sm transition-all isolate', props.class, {
|
||||
'relative outline outline-2 outline-offset-4 outline-transparent hover:-translate-y-[.2rem]':
|
||||
props.link
|
||||
props.link || props.hasClick
|
||||
})
|
||||
"
|
||||
>
|
||||
@@ -24,5 +27,9 @@ const props = defineProps<{
|
||||
:to="props.link"
|
||||
class="absolute inset-0 z-10 focus-visible:outline-none"
|
||||
/>
|
||||
<button
|
||||
v-if="props.hasClick"
|
||||
class="absolute inset-0 z-10 focus-visible:outline-none"
|
||||
@click="emit('on-click')" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user