react-selectable-box
Version:
A React component used hooks that allows you to select elements in the drag area using the mouse
9 lines • 339 B
JavaScript
import React, { useContext } from 'react';
export var SelectableContext = /*#__PURE__*/React.createContext({});
export var useSelectableContext = function useSelectableContext() {
var context = useContext(SelectableContext);
if (!context) {
throw new Error('Please put the selectable items in Selectable');
}
return context;
};