mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-09-20 09:13:41 +02:00
27 lines
536 B
JavaScript
27 lines
536 B
JavaScript
|
import React from 'react';
|
||
|
import {useActionState} from './helper';
|
||
|
import FieldComment from '../src/components/FieldComment';
|
||
|
import {Wrapper} from './ui';
|
||
|
import {withA11y} from '@storybook/addon-a11y';
|
||
|
|
||
|
export default {
|
||
|
title: 'FieldComment',
|
||
|
component: FieldComment,
|
||
|
decorators: [withA11y],
|
||
|
};
|
||
|
|
||
|
|
||
|
export const Basic = () => {
|
||
|
const [value, setValue] = useActionState("onChange", "Hello\nworld");
|
||
|
|
||
|
return (
|
||
|
<Wrapper>
|
||
|
<FieldComment
|
||
|
value={value}
|
||
|
onChange={setValue}
|
||
|
/>
|
||
|
</Wrapper>
|
||
|
);
|
||
|
};
|
||
|
|