mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 18:01:17 +01:00
30 lines
589 B
JavaScript
30 lines
589 B
JavaScript
|
import React from 'react';
|
||
|
import {useActionState} from './helper';
|
||
|
import FieldSymbol from '../src/components/FieldSymbol';
|
||
|
import {Wrapper} from './ui';
|
||
|
import {withA11y} from '@storybook/addon-a11y';
|
||
|
|
||
|
export default {
|
||
|
title: 'FieldSymbol',
|
||
|
component: FieldSymbol,
|
||
|
decorators: [withA11y],
|
||
|
};
|
||
|
|
||
|
|
||
|
export const Basic = () => {
|
||
|
const icons = ["Bicycle", "Ski", "Ramp"];
|
||
|
const [value, setValue] = useActionState("onChange", "Ski");
|
||
|
|
||
|
return (
|
||
|
<Wrapper>
|
||
|
<FieldSymbol
|
||
|
icons={icons}
|
||
|
value={value}
|
||
|
onChange={setValue}
|
||
|
/>
|
||
|
</Wrapper>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
|