adding some dropdown components
This commit is contained in:
parent
5f87596b2f
commit
a2a747c489
22
src/resources/js/Components/DropdownLink.vue
Normal file
22
src/resources/js/Components/DropdownLink.vue
Normal file
@ -0,0 +1,22 @@
|
||||
<script setup>
|
||||
import { Link } from '@inertiajs/inertia-vue3'
|
||||
|
||||
defineProps({
|
||||
href: String,
|
||||
as: String,
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<button v-if="as == 'button'" type="submit" class="block w-full px-4 py-2 text-sm leading-5 text-gray-700 text-left hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition">
|
||||
<slot></slot>
|
||||
</button>
|
||||
|
||||
<a v-else-if="as =='a'" :href="href" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition">
|
||||
<slot></slot>
|
||||
</a>
|
||||
|
||||
<Link v-else :href="href" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition">
|
||||
<slot></slot>
|
||||
</Link>
|
||||
</template>
|
7
src/resources/js/Components/DropdownSeparator.vue
Normal file
7
src/resources/js/Components/DropdownSeparator.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<script setup>
|
||||
//
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="border-t border-gray-100"></div>
|
||||
</template>
|
9
src/resources/js/Components/DropdownTitle.vue
Normal file
9
src/resources/js/Components/DropdownTitle.vue
Normal file
@ -0,0 +1,9 @@
|
||||
<script setup>
|
||||
//
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="block px-4 py-2 text-xs text-gray-400">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
Loading…
x
Reference in New Issue
Block a user