42 lines
2.2 KiB
Vue
42 lines
2.2 KiB
Vue
<template>
|
|
<Menu as="div" class="relative inline-block text-left">
|
|
<div>
|
|
<MenuButton class="inline-flex w-full justify-center gap-x-1.5 rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50">
|
|
Options
|
|
<ChevronDownIcon class="-mr-1 h-5 w-5 text-gray-400" aria-hidden="true" />
|
|
</MenuButton>
|
|
</div>
|
|
|
|
<transition enter-active-class="transition ease-out duration-100" enter-from-class="transform opacity-0 scale-95" enter-to-class="transform opacity-100 scale-100" leave-active-class="transition ease-in duration-75" leave-from-class="transform opacity-100 scale-100" leave-to-class="transform opacity-0 scale-95">
|
|
<MenuItems class="absolute right-0 z-10 mt-2 w-56 origin-top-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none">
|
|
<div class="px-4 py-3">
|
|
<p class="text-sm">Signed in as</p>
|
|
<p class="truncate text-sm font-medium text-gray-900">tom@example.com</p>
|
|
</div>
|
|
<div class="py-1">
|
|
<MenuItem v-slot="{ active }">
|
|
<a href="#" :class="[active ? 'bg-gray-100 text-gray-900' : 'text-gray-700', 'block px-4 py-2 text-sm']">Account settings</a>
|
|
</MenuItem>
|
|
<MenuItem v-slot="{ active }">
|
|
<a href="#" :class="[active ? 'bg-gray-100 text-gray-900' : 'text-gray-700', 'block px-4 py-2 text-sm']">Support</a>
|
|
</MenuItem>
|
|
<MenuItem v-slot="{ active }">
|
|
<a href="#" :class="[active ? 'bg-gray-100 text-gray-900' : 'text-gray-700', 'block px-4 py-2 text-sm']">License</a>
|
|
</MenuItem>
|
|
</div>
|
|
<div class="py-1">
|
|
<form method="POST" action="#">
|
|
<MenuItem v-slot="{ active }">
|
|
<button type="submit" :class="[active ? 'bg-gray-100 text-gray-900' : 'text-gray-700', 'block w-full px-4 py-2 text-left text-sm']">Sign out</button>
|
|
</MenuItem>
|
|
</form>
|
|
</div>
|
|
</MenuItems>
|
|
</transition>
|
|
</Menu>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue'
|
|
import { ChevronDownIcon } from '@heroicons/vue/20/solid'
|
|
</script> |