UNPKG

@seasketch/geoprocessing

Version:

Geoprocessing and reporting framework for SeaSketch 2.0

46 lines 3.3 kB
import React from "react"; import Card from "./Card.js"; import { LayerToggle } from "./LayerToggle.js"; import ReportDecorator from "./storybook/ReportDecorator.js"; import { ReportContext, sampleSketchReportContextValue, } from "../context/index.js"; export default { component: LayerToggle, title: "Components/LayerToggle", decorators: [ReportDecorator], }; const sampleContextValue = sampleSketchReportContextValue(); const checkedContext = { ...sampleContextValue, visibleLayers: ["5e80c8a8cd44abca6e5268af"], }; export const simpleUnchecked = () => (React.createElement(ReportContext.Provider, { value: sampleContextValue }, React.createElement(Card, { title: "Card Title" }, React.createElement(LayerToggle, { layerId: "5e80c8a8cd44abca6e5268af", simple: true })))); export const simpleChecked = () => (React.createElement(ReportContext.Provider, { value: checkedContext }, React.createElement(Card, { title: "Card Title" }, React.createElement(LayerToggle, { layerId: "5e80c8a8cd44abca6e5268af", simple: true })))); export const simpleSmallUnchecked = () => (React.createElement(ReportContext.Provider, { value: sampleContextValue }, React.createElement(Card, { title: "Card Title" }, React.createElement(LayerToggle, { layerId: "5e80c8a8cd44abca6e5268af", simple: true, size: "small" })))); export const simpleSmallChecked = () => (React.createElement(ReportContext.Provider, { value: checkedContext }, React.createElement(Card, { title: "Card Title" }, React.createElement(LayerToggle, { layerId: "5e80c8a8cd44abca6e5268af", simple: true, size: "small" })))); export const simpleUncheckedLabel = () => (React.createElement(ReportContext.Provider, { value: sampleContextValue }, React.createElement(Card, { title: "Card Title" }, React.createElement(LayerToggle, { layerId: "5e80c8a8cd44abca6e5268af", label: "Show Map", simple: true })))); export const simpleCheckedLabel = () => (React.createElement(ReportContext.Provider, { value: checkedContext }, React.createElement(Card, { title: "Card Title" }, React.createElement(LayerToggle, { layerId: "5e80c8a8cd44abca6e5268af", label: "Show Map", simple: true })))); export const unchecked = () => (React.createElement(ReportContext.Provider, { value: sampleContextValue }, React.createElement(Card, { title: "Card Title" }, React.createElement(LayerToggle, { layerId: "5e80c8a8cd44abca6e5268af", label: "Show Map Layer" })))); export const checked = () => (React.createElement(ReportContext.Provider, { value: checkedContext }, React.createElement(Card, { title: "Card Title" }, React.createElement(LayerToggle, { layerId: "5e80c8a8cd44abca6e5268af", label: "Show Map Layer" })))); export const emptyStringLayerId = () => (React.createElement(ReportContext.Provider, { value: sampleContextValue }, React.createElement(Card, { title: "Card Title" }, React.createElement(LayerToggle, { layerId: "", label: "Show Map Layer" })))); export const noLayerId = () => (React.createElement(ReportContext.Provider, { value: sampleContextValue }, React.createElement(Card, { title: "Card Title" }, React.createElement(LayerToggle, { label: "Show Map Layer" })))); //# sourceMappingURL=LayerToggle.stories.js.map