mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 17:31:14 +01:00
29 lines
599 B
JavaScript
29 lines
599 B
JavaScript
|
import React from 'react';
|
||
|
import {useActionState} from './helper';
|
||
|
import FieldFont from '../src/components/FieldFont';
|
||
|
import {Wrapper} from './ui';
|
||
|
import {withA11y} from '@storybook/addon-a11y';
|
||
|
|
||
|
export default {
|
||
|
title: 'FieldFont',
|
||
|
component: FieldFont,
|
||
|
decorators: [withA11y],
|
||
|
};
|
||
|
|
||
|
|
||
|
export const Basic = () => {
|
||
|
const fonts = ["Comic Sans", "Helvectica", "Gotham"];
|
||
|
const [value, setValue] = useActionState("onChange", ["Comic Sans"]);
|
||
|
|
||
|
return (
|
||
|
<Wrapper>
|
||
|
<FieldFont
|
||
|
fonts={fonts}
|
||
|
value={value}
|
||
|
onChange={setValue}
|
||
|
/>
|
||
|
</Wrapper>
|
||
|
);
|
||
|
};
|
||
|
|