UNPKG

@stories-js/core

Version:

Stories web components to build stories

5 lines 706 B
/*! * (C) StoriesJS https://storiesjs.org - GPL-2.0 License */ var hostContext=function(t,e){return e.closest(t)!==null};var createColorClasses=function(t,e){var r;return typeof t==="string"&&t.length>0?Object.assign((r={"stories-color":true},r["stories-color-".concat(t)]=true,r),e):e};var SIZE_TO_MEDIA={xs:"(min-width: 0px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)"};var matchBreakpoint=function(t){if(t===undefined||t===""){return true}if(window.matchMedia){var e=SIZE_TO_MEDIA[t];return window.matchMedia(e).matches}return false};export{createColorClasses as c,hostContext as h,matchBreakpoint as m}; //# sourceMappingURL=utils-c1c54ef8.js.map