@crossed/ui
Version:
A universal & performant styling library for React Native, Next.js & React
27 lines (26 loc) • 672 B
JavaScript
import { jsx } from "react/jsx-runtime";
import { memo, useCallback } from "react";
import { growStyles } from "../../styles";
import { Select } from "../Select";
import { YBox } from "../../layout";
const SelectYear = memo(({ year, years, onChange }) => {
const handleChange = useCallback(
(e) => onChange(Number(e)),
[onChange]
);
return /* @__PURE__ */ jsx(YBox, { style: growStyles.on, children: /* @__PURE__ */ jsx(
Select,
{
value: `${year}`,
onChange: handleChange,
items: years.map((m) => ({
value: `${m}`,
label: m
}))
}
) });
});
export {
SelectYear
};
//# sourceMappingURL=SelectYear.js.map