text: (window.webpackJsonp=window.webpackJsonp||[]).push([[18],{"89M3":function(e,t,n){"use strict";n.r(t),n.d(t,"_frontmatter",(function(){return m})),n.d(t,"default",(function(){return d}));n("5hJT"),n("W1QL"),n("K/PF"),n("t91x"),n("75LO"),n("PJhk"),n("mXGw");var o=n("/FXl"),r=n("TjRS"),a=n("ZFoC"),i=n("KMBU"),c=n("xGbp"),b=n("UEVe");n("aD51");function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}var m={};void 0!==m&&m&&m===Object(m)&&Object.isExtensible(m)&&!m.hasOwnProperty("__filemeta")&&Object.defineProperty(m,"__filemeta",{configurable:!0,value:{name:"_frontmatter",filename:"src/docs/mdx/onResize.mdx"}});var l={_frontmatter:m},u=r.a;function d(e){var t,n=e.components,d=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,["components"]);return Object(o.b)(u,s({},l,d,{components:n,mdxType:"MDXLayout"}),Object(o.b)("h1",{id:"onresize"},"onResize"),Object(o.b)("h4",{id:"you-can-listen-to-the-onresize-event-of-the-carousel-this-will-get-invoked-on-each-resize-event-of-the-root-element-and-will-return-the-current-breakpoint-object-being-used"},"You can listen to the ",Object(o.b)("inlineCode",{parentName:"h4"},"onResize")," event of the ",Object(o.b)("inlineCode",{parentName:"h4"},"Carousel"),", this will get invoked on each ",Object(o.b)("inlineCode",{parentName:"h4"},"resize")," event of the root element and will return the current ",Object(o.b)("inlineCode",{parentName:"h4"},"breakPoint")," object being used:"),Object(o.b)("pre",null,Object(o.b)("code",s({parentName:"pre"},{}),"(currentBreakPoint) => {/*...*/}\n")),Object(o.b)(a.c,{__position:0,__code:"<Carousel\n  breakPoints={breakPoints}\n  onResize={currentBreakPoint =>\n    console.log(JSON.stringify(currentBreakPoint))\n  }\n>\n  <Item>1</Item>\n  <Item>2</Item>\n  <Item>3</Item>\n  <Item>4</Item>\n  <Item>5</Item>\n  <Item>6</Item>\n</Carousel>",__scope:(t={props:d,DefaultLayout:r.a,Playground:a.c,Props:a.d,Carousel:i.b,Item:c.a,breakPoints:b.a},t.DefaultLayout=r.a,t._frontmatter=m,t),mdxType:"Playground"},Object(o.b)(i.b,{breakPoints:b.a,onResize:function(e){return console.log(JSON.stringify(e))},mdxType:"Carousel"},Object(o.b)(c.a,{mdxType:"Item"},"1"),Object(o.b)(c.a,{mdxType:"Item"},"2"),Object(o.b)(c.a,{mdxType:"Item"},"3"),Object(o.b)(c.a,{mdxType:"Item"},"4"),Object(o.b)(c.a,{mdxType:"Item"},"5"),Object(o.b)(c.a,{mdxType:"Item"},"6"))))}d&&d===Object(d)&&Object.isExtensible(d)&&!d.hasOwnProperty("__filemeta")&&Object.defineProperty(d,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"src/docs/mdx/onResize.mdx"}}),d.isMDXComponent=!0}}]);
  //# sourceMappingURL=component---src-docs-mdx-on-resize-mdx-daf9e00bc8a1aab2ede9.js.map