mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-27 09:05:25 +01:00
2cc179acc1
- Added searchParams based router for easier testing - Added more stories to the storybook
58 lines
1.3 KiB
JavaScript
58 lines
1.3 KiB
JavaScript
import React from 'react';
|
|
import LayerList from '../src/components/LayerList';
|
|
import {action} from '@storybook/addon-actions';
|
|
import {Wrapper} from './ui';
|
|
import {withA11y} from '@storybook/addon-a11y';
|
|
|
|
|
|
export default {
|
|
title: 'LayerList',
|
|
component: LayerList,
|
|
decorators: [withA11y],
|
|
};
|
|
|
|
export const Basic = () => (
|
|
<Wrapper>
|
|
<div style={{width: "200px"}}>
|
|
<LayerList
|
|
layers={[
|
|
{
|
|
id: "background",
|
|
type: "background",
|
|
},
|
|
{
|
|
id: "water",
|
|
type: "fill",
|
|
source: "openmaptiles"
|
|
},
|
|
{
|
|
id: "road_trunk",
|
|
type: "line",
|
|
source: "openmaptiles"
|
|
},
|
|
{
|
|
id: "road_minor",
|
|
type: "line",
|
|
source: "openmaptiles"
|
|
},
|
|
{
|
|
id: "building",
|
|
type: "fill",
|
|
source: "openmaptiles"
|
|
},
|
|
]}
|
|
selectedLayerIndex={0}
|
|
onLayersChange={() => {}}
|
|
onLayerSelect={() => {}}
|
|
onLayerDestroy={() => {}}
|
|
onLayerCopy={() => {}}
|
|
onLayerVisibilityToggle={() => {}}
|
|
onMoveLayer={() => {}}
|
|
sources={{}}
|
|
errors={[]}
|
|
/>
|
|
</div>
|
|
</Wrapper>
|
|
);
|
|
|
|
|