@progress/kendo-react-scheduler
Version:
React Scheduler brings the functionality of Outlook's Calendar to a single UI component. KendoReact Scheduler package
24 lines (23 loc) • 1.06 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import * as c from "react";
import { SchedulerPropsContext as n } from "../context/SchedulerContext.mjs";
const f = (t) => {
const o = c.useContext(n), e = t !== void 0 ? t : o.editable || !1, r = e === !0 || e !== void 0 && e !== !1 && e.edit === !0, s = e === !0 || e !== void 0 && e !== !1 && e.resize === !0, d = e === !0 || e !== void 0 && e !== !1 && e.remove === !0, u = e === !0 || e !== void 0 && e !== !1 && e.drag === !0, i = e === !0 || e !== void 0 && e !== !1 && e.add === !0, a = e === !0 || e !== void 0 && e !== !1 && e.select === !0;
return {
add: i,
edit: r,
drag: u,
remove: d,
resize: s,
select: a
};
};
export {
f as useEditable
};