text: (window.webpackJsonp=window.webpackJsonp||[]).push([[25],{"8sOg":function(e,t,a){"use strict";a.r(t),a.d(t,"_frontmatter",(function(){return i})),a.d(t,"default",(function(){return D}));var n=a("Fcif"),r=a("+I+c"),o=a("mXGw"),c=a("/FXl"),d=a("TjRS"),l=a("ZFoC"),s=a("GYKu"),b=a("Tmbg"),u=a("9b5V"),i=(a("aD51"),{});void 0!==i&&i&&i===Object(i)&&Object.isExtensible(i)&&!i.hasOwnProperty("__filemeta")&&Object.defineProperty(i,"__filemeta",{configurable:!0,value:{name:"_frontmatter",filename:"src/docs/hooks/useCalendarState.mdx"}});m="DateLabel";var m,p={_frontmatter:i},f=d.a;function D(e){var t,a=e.components,m=Object(r.a)(e,["components"]);return Object(c.b)(f,Object(n.a)({},p,m,{components:a,mdxType:"MDXLayout"}),Object(c.b)("h1",{id:"usecalendarstate"},"useCalendarState"),Object(c.b)("p",null,Object(c.b)("inlineCode",{parentName:"p"},"useCalendarState")," is a hook which will provide the current state of your components."),Object(c.b)("h2",{id:"example"},"Example"),Object(c.b)(l.c,{__position:0,__code:"() => {\n  const DateLabel = () => {\n    const { format, getDateFormat } = useDateAPI()\n    const { startDate: selectedDate } = useCalendarState()\n    let dateLabel = 'Select A Date'\n    if (selectedDate) {\n      const formatter = getDateFormat(formatNames.ARIA_DAY_LABEL)\n      dateLabel = format(selectedDate, formatter)\n    }\n    return <p>{dateLabel}</p>\n  }\n  return (\n    <CalendarProvider adapter={dateAdapter}>\n      <DateLabel />\n      <Calendar />\n    </CalendarProvider>\n  )\n}",__scope:(t={props:m,DefaultLayout:d.a,useState:o.useState,Playground:l.c,useDateAPI:s.t,useCalendarState:s.s,Calendar:s.c,CalendarProvider:s.d,formatNames:b.a,dateAdapter:u.a},t.DefaultLayout=d.a,t._frontmatter=i,t),mdxType:"Playground"},(function(){return Object(c.b)(s.d,{adapter:u.a,mdxType:"CalendarProvider"},Object(c.b)((function(){var e=Object(s.t)(),t=e.format,a=e.getDateFormat,n=Object(s.s)().startDate,r="Select A Date";n&&(r=t(n,a(b.a.ARIA_DAY_LABEL)));return Object(c.b)("p",null,r)}),{mdxType:"DateLabel"}),Object(c.b)(s.c,{mdxType:"Calendar"}))})))}void 0!==D&&D&&D===Object(D)&&Object.isExtensible(D)&&!D.hasOwnProperty("__filemeta")&&Object.defineProperty(D,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"src/docs/hooks/useCalendarState.mdx"}}),D.isMDXComponent=!0}}]);
  //# sourceMappingURL=component---src-docs-hooks-use-calendar-state-mdx-d3b2db02444906b5abb9.js.map