decord/source/1831_context.js
2026-07-29 08:29:29 +00:00

23 lines
548 B
JavaScript

// Module ID: 1831
// Function ID: 1832
// Name: context
// Dependencies: [19]
// Exports: useToolbarContext
// Module 1831 (context)
import noop from "noop";
const useContext = noop.useContext;
const context = noop.createContext(undefined);
export const ToolbarContext = context;
export const useToolbarContext = () => {
const tmp = useContext(context);
if (tmp) {
return tmp;
} else {
const _Error = Error;
const error = new Error("KeyboardToolbar.* component must be used inside <KeyboardToolbar>");
throw error;
}
};