@seasketch/geoprocessing
Version:
Geoprocessing and reporting framework for SeaSketch 2.0
19 lines • 760 B
JavaScript
import React from "react";
import { ReportStoryLayout } from "./ReportStoryLayout.js";
/**
* Decorator that renders a story into ReportStoryLayout.
*/
export const ReportDecorator = (storyFn) => {
return React.createElement(ReportStoryLayout, null, storyFn());
};
export default ReportDecorator;
/**
* Think of this as a ReportDecorator generator, that allows you to pass in context and override the default
* The only reason to use this instead of ReportDecorator directly is to pass context
*/
export const createReportDecorator = (reportContext) =>
// eslint-disable-next-line react/display-name
(storyFn) => {
return (React.createElement(ReportStoryLayout, { value: reportContext }, storyFn()));
};
//# sourceMappingURL=ReportDecorator.js.map