mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 02:25:29 +01:00
29 lines
589 B
JavaScript
29 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>
|
|
);
|
|
};
|
|
|
|
|