2026-07-29 08:29:29 +00:00
|
|
|
// Module ID: 1831
|
|
|
|
|
// Function ID: 1832
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: context
|
2026-07-29 08:29:29 +00:00
|
|
|
// Dependencies: [19]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: useToolbarContext
|
|
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
// Module 1831 (context)
|
|
|
|
|
import noop from "noop";
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
const useContext = noop.useContext;
|
|
|
|
|
const context = noop.createContext(undefined);
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export const ToolbarContext = context;
|
2026-07-29 08:29:29 +00:00
|
|
|
export const useToolbarContext = () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
};
|