UNPKG

@nuxt/devtools

Version:

<a href="https://devtools.nuxt.com"><img width="1200" alt="Nuxt DevTools" src="https://github-production-user-asset-6210df.s3.amazonaws.com/904724/261577617-a10567bd-ad33-48cc-9bda-9e37dbe1929f.png"></a> <br>

2 lines (1 loc) 798 B
import{d as i,Y as p,r as u,aS as c,o as m,m as f,a8 as n,i as v,j as b,v as k,f as s,k as _,D as V,_ as B}from"./Bysyzw-g.js";const $=i({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"}},setup(r,{emit:l}){const e=p(r,"modelValue",l,{passive:!0}),a=u();return c(a,()=>{e.value=!1}),(t,o)=>{const d=B;return m(),f("div",{ref_key:"el",ref:a,class:"relative"},[n(t.$slots,"trigger",{enabled:s(e),click:()=>e.value=!s(e)},()=>[v(d,{onClick:o[0]||(o[0]=g=>e.value=!s(e))},{default:b(()=>o[1]||(o[1]=[k(" Dropdown ")])),_:1})]),_("div",{class:V(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[s(e)?"op-100":"op0 pointer-events-none -translate-y-1",t.direction==="end"?"right-0":"left-0"]])},[n(t.$slots,"default")],2)],512)}}});export{$ as _};