UNPKG

@rnwonder/react-date-picker

Version:

A lightweight, customizable, and accessible date picker component for React applications.

57 lines (56 loc) 1.31 kB
"use client"; import { jsx as o, Fragment as i } from "react/jsx-runtime"; import { M as s } from "./index-ULrqONQv.js"; import { d as n, S as f } from "./index-C-0w3u6j.js"; import { P as p } from "./index-D1g166JZ.js"; import { useState as l } from "react"; import { c as S } from "./class-DLUjLwnh.js"; const x = (r) => { const [c, e] = l(!1), [m, t] = l(n); return /* @__PURE__ */ o(i, { children: r.monthSelectorType === "compact-dropdown" ? /* @__PURE__ */ o( s, { ...r, setSelectorTwoProps: t, setShowSelectorTwo: e, showSelectorTwo: c } ) : /* @__PURE__ */ o( p, { content: ({ close: a }) => /* @__PURE__ */ o( "div", { className: S(` rn-w-[17.5rem] `), children: /* @__PURE__ */ o( f, { ...m, setShowSelectorTwo: e, setSelectorTwoProps: t, close: a } ) } ), width: "fit-content", onClose: () => { e(!1), t(n); }, children: /* @__PURE__ */ o( s, { ...r, setSelectorTwoProps: t, setShowSelectorTwo: e, showSelectorTwo: c } ) } ) }); }; export { x as default };