UNPKG

@seasketch/geoprocessing

Version:

Geoprocessing and reporting framework for SeaSketch 2.0

25 lines 1.18 kB
import React, { useState } from "react"; import { ReportPage } from "./ReportPage.js"; import ReportDecorator from "./storybook/ReportDecorator.js"; import { SegmentControl } from "./SegmentControl.js"; import Card from "./Card.js"; export default { component: ReportPage, title: "Components/ReportPage", decorators: [ReportDecorator], }; export const reportPage = () => { const [tab, setTab] = useState("page1"); const enableAllTabs = false; return (React.createElement(React.Fragment, null, React.createElement("div", { style: { marginTop: 5 } }, React.createElement(SegmentControl, { value: tab, onClick: (segment) => setTab(segment), segments: [ { id: "page1", label: "Page 1" }, { id: "page2", label: "Page 2" }, ] })), React.createElement(ReportPage, { hidden: !enableAllTabs && tab !== "page1" }, React.createElement(Card, null, "Report page 1")), React.createElement(ReportPage, { hidden: !enableAllTabs && tab !== "page2" }, React.createElement(Card, null, "Report page 2")))); }; //# sourceMappingURL=ReportPage.stories.js.map