// Storybook import { ComponentStory, ComponentMeta } from '@storybook/react'; // React import React from "react"; // Internal imports import { ChoroplethLayerTool, SidebarTab, SidebarTool } from '../react/components'; // Styles import '../styles/common.scss'; // Stories internal helper components import { ExportMapWrapper } from '../storiesHelpers/ExportMapWrapper'; // Data import demo1 from '../../static/data/demo1.json'; const SidebarToolDemo = (props: ISidebarToolDemoProps) : JSX.Element => { const extendedProps = { mapId: 'geovisto-map-sidebar-demo', data: demo1, ...props }; return ( ); }; export default { component: SidebarToolDemo, title: 'Tools/Sidebar Tool', argTypes: { showBaseTileLayerMap: { name: "Base tile layer: Enabled", description: "Toggles the base tiles layer.", }, toolId: { name: "SidebarTool: Id", description: "Id property of the SidebarTool instance.", }, toolLabel: { name: "SidebarTool: Label", description: "Label property of the SidebarTool instance.", }, toolEnabled: { name: "SidebarTool: Enabled", description: "Enabled property of the SidebarTool instance.", }, sidebarTabTool: { name: "SidebarTab: ToolId", description: "ToolId property of the SidebarTab instance.", }, sidebarTabEnabled: { name: "SidebarTab: Enabled", description: "Enabled property of the SidebarTab instance.", }, sidebarTabName: { name: "SidebarTab: Name", description: "Name property of the SidebarTab instance.", }, sidebarTabIcon: { name: "SidebarTab: Icon", description: "Icon property of the SidebarTab instance.", }, sidebarTabCheckButton: { name: "SidebarTab: CheckButton", description: "CheckButton property of the SidebarTab instance.", } }, } as ComponentMeta; export type ISidebarToolDemoProps = { toolId: string; toolEnabled: boolean; toolLabel: string; sidebarToolEnabled: boolean; sidebarTabTool: string; showBaseTileLayerMap: boolean; sidebarTabEnabled: boolean; sidebarTabName: string; sidebarTabIcon: string; sidebarTabCheckButton: boolean; } const Template : ComponentStory = args => export const GeovistoSidebarToolStory = Template.bind({}); GeovistoSidebarToolStory.storyName = 'Sidebar Tool'; GeovistoSidebarToolStory.args = { toolEnabled: true, toolId: 'geovisto-sidebar-tool-map', toolLabel: 'Sidebar Tool label', sidebarTabTool: 'geovisto-tool-layer-choropleth', sidebarTabEnabled: true, sidebarTabName: 'Choropleth layer settings', sidebarTabIcon: '', sidebarTabCheckButton: true, showBaseTileLayerMap: true }