@fifteen/design-system-vue
Version:
Vue 3 (Composition API + Typescript) implementation of the Fifteen Design System
2 lines (1 loc) • 880 B
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../constants/breakpoints.js"),i=require("@vueuse/core"),t=require("vue");function D(){const s=i.useBreakpoints(A.breakpointsValues),u={xxs:s.smaller("xxs"),xs:s.smaller("xs"),sm:s.smaller("sm"),md:s.smaller("md"),lg:s.smaller("lg")},o=i.useMounted(),l=t.computed(()=>o.value&&u.xxs.value),r=t.computed(()=>o.value&&u.xs.value),a=t.computed(()=>o.value&&u.sm.value),c=t.computed(()=>o.value&&u.md.value),d=t.computed(()=>o.value&&u.lg.value);function m(e,n){return l.value?e:n}function v(e,n){return r.value?e:n}function x(e,n){return a.value?e:n}function p(e,n){return c.value?e:n}function w(e,n){return d.value?e:n}return{isXxsAndDown:l,isXsAndDown:r,isSmAndDown:a,isMdAndDown:c,isLgAndDown:d,xxsAndDown:m,xsAndDown:v,smAndDown:x,mdAndDown:p,lgAndDown:w}}exports.useFBreakpoints=D;