mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 19:52:15 +01:00
add dashboard frontend
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
|
||||
defineProps({
|
||||
href: String,
|
||||
as: String,
|
||||
});
|
||||
defineProps<{
|
||||
href?: string;
|
||||
as?: string;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -12,21 +12,21 @@ defineProps({
|
||||
<button
|
||||
v-if="as == 'button'"
|
||||
type="submit"
|
||||
class="block w-full px-4 py-2 text-start text-sm leading-5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-800 transition duration-150 ease-in-out">
|
||||
v-bind="$attrs"
|
||||
class="block w-full px-4 py-2 text-start text-sm leading-5 text-white hover:bg-card-background-active focus:outline-none focus:bg-card-background-active transition duration-150 ease-in-out">
|
||||
<slot />
|
||||
</button>
|
||||
|
||||
<a
|
||||
v-else-if="as == 'a'"
|
||||
:href="href"
|
||||
class="block px-4 py-2 text-sm leading-5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-800 transition duration-150 ease-in-out">
|
||||
class="block px-4 py-2 text-sm leading-5 text-white hover:bg-card-background-active focus:outline-none focus:bg-card-background-active transition duration-150 ease-in-out">
|
||||
<slot />
|
||||
</a>
|
||||
|
||||
<Link
|
||||
v-else
|
||||
:href="href ?? ''"
|
||||
class="block px-4 py-2 text-sm leading-5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-800 transition duration-150 ease-in-out">
|
||||
class="block px-4 py-2 text-sm leading-5 text-white hover:bg-card-background-active focus:outline-none focus:bg-card-background-active transition duration-150 ease-in-out">
|
||||
<slot />
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user