mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-11-10 03:51:56 +01:00
2cc179acc1
- Added searchParams based router for easier testing - Added more stories to the storybook
56 lines
1 KiB
JavaScript
56 lines
1 KiB
JavaScript
import React from 'react';
|
|
import IconLayer from '../src/components/IconLayer';
|
|
import {action} from '@storybook/addon-actions';
|
|
import {Wrapper} from './ui';
|
|
import {withA11y} from '@storybook/addon-a11y';
|
|
|
|
|
|
export default {
|
|
title: 'IconLayer',
|
|
component: IconLayer,
|
|
decorators: [withA11y],
|
|
};
|
|
|
|
export const IconList = () => {
|
|
const types = [
|
|
'fill-extrusion',
|
|
'raster',
|
|
'hillshade',
|
|
'heatmap',
|
|
'fill',
|
|
'background',
|
|
'line',
|
|
'symbol',
|
|
'circle',
|
|
'INVALID',
|
|
]
|
|
|
|
return <Wrapper>
|
|
<table style={{textAlign: "left"}}>
|
|
<thead style={{borderBottom: "solid 1px white"}}>
|
|
<tr>
|
|
<td>ID</td>
|
|
<td>Preview</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{types.map(type => (
|
|
<tr>
|
|
<td style={{paddingRight: "1em"}}>
|
|
<code>{type}</code>
|
|
</td>
|
|
<td>
|
|
<IconLayer type={type} />
|
|
</td>
|
|
</tr>
|
|
))}
|
|
</tbody>
|
|
</table>
|
|
</Wrapper>
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|