Files
headlessui/playgrounds/vue/src/components/focus-trap/focus-trap.vue
T
Robin Malfait a73007388f Ensure playgrounds work + switch to npm workspaces (#2907)
* bump Next in playground

* convert legacy Link after Next.js bump

* update yarn.lock

* switch to npm workspaces

* move `packages/playground-*` to `playgrounds/*`

* use `npm` instead of `yarn`

* sync package-lock.json

* use node 20 for insiders releases
2024-01-03 14:26:12 +01:00

28 lines
599 B
Vue

<template>
<div class="flex h-full w-screen justify-center bg-gray-50 p-12">
<div class="mx-auto w-full max-w-xs">
<button>Previous</button>
<FocusTrap>
<button>Trigger</button>
</FocusTrap>
<button>After</button>
</div>
</div>
</template>
<script>
import { defineComponent, h, ref, onMounted, watchEffect, watch } from 'vue'
import { FocusTrap } from '@headlessui/vue'
function classNames(...classes) {
return classes.filter(Boolean).join(' ')
}
export default {
components: { FocusTrap },
setup(props, context) {
return {}
},
}
</script>