laif-ds
Version:
Design System di Laif con componenti React basati su principi di Atomic Design
43 lines (42 loc) • 710 B
JavaScript
"use client";
import { jsx as c } from "react/jsx-runtime";
import { createContext as i, useContext as l } from "react";
const o = i({
activeEditor: {},
$updateToolbar: () => {
},
blockType: "paragraph",
setBlockType: () => {
},
showModal: () => {
}
});
function x({
activeEditor: t,
$updateToolbar: e,
blockType: r,
setBlockType: n,
showModal: a,
children: u
}) {
return /* @__PURE__ */ c(
o.Provider,
{
value: {
activeEditor: t,
$updateToolbar: e,
blockType: r,
setBlockType: n,
showModal: a
},
children: u
}
);
}
function C() {
return l(o);
}
export {
x as ToolbarContext,
C as useToolbarContext
};