decord/source/1878_context.js
2026-08-11 06:20:06 +00:00

23 lines
548 B
JavaScript

// Module ID: 1878
// Function ID: 1879
// Name: context
// Dependencies: [19]
// Exports: useToolbarContext
// Module 1878 (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;
}
};