All Downloads are FREE. Search and download functionalities are using the official Maven repository.

theme.keycloak.v2.admin.resources.assets.DropdownPanel-BoHoC5Zg.js Maven / Gradle / Ivy

There is a newer version: 26.0.7
Show newest version
import{jsxs as d,jsx as i}from"react/jsx-runtime";import{useRef as u,useEffect as s}from"react";import{ca as f,aN as v,dz as k}from"./main-C7ps2lmX.js";const y=({buttonText:o,children:c,setSearchDropdownOpen:e,searchDropdownOpen:a,marginRight:r,width:l})=>{const t=u(null);return s(()=>{const n=m=>{t.current&&!t.current.contains(m.target)&&e(!1)};return document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)},[e]),s(()=>{const n=()=>{document.visibilityState==="hidden"&&e(!1)};return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[e]),d("span",{ref:t,children:[d("button",{className:"kc-dropdown-panel",onClick:()=>e(!a),"aria-label":o,style:{width:l,marginRight:r},"data-testid":"dropdown-panel-btn",children:[o,i(f,{className:"kc-dropdown-panel-icon",children:i(v,{})})]}),a&&i("div",{className:k?.matches?"kc-dropdown-panel-content dark-mode":"kc-dropdown-panel-content light-mode",children:c})]})};export{y as D};
//# sourceMappingURL=DropdownPanel-BoHoC5Zg.js.map




© 2015 - 2025 Weber Informatics LLC | Privacy Policy