UNPKG

react-plot

Version:

Library of React components to render SVG 2D plots.

11 lines 951 B
import { jsx as _jsx } from "react/jsx-runtime"; import { plotControlsContext, plotEventsPlotContext, plotEventsUserContext, plotOverridesContext, } from './plotControllerContext.js'; import { usePlotEventsState } from './usePlotEvents.js'; import { usePlotOverridesState } from './usePlotOverrides.js'; export function PlotController(props) { const { id, children } = props; const { userActions, plotActions } = usePlotEventsState(); const { overrides, controls } = usePlotOverridesState(); return (_jsx(plotOverridesContext.NestedContextProvider, { id: id, value: overrides, children: _jsx(plotControlsContext.NestedContextProvider, { id: id, value: controls, children: _jsx(plotEventsUserContext.NestedContextProvider, { id: id, value: userActions, children: _jsx(plotEventsPlotContext.NestedContextProvider, { id: id, value: plotActions, children: children }) }) }) })); } //# sourceMappingURL=plotControllerContext.provider.js.map