mirror of
https://github.com/maputnik/editor.git
synced 2026-07-25 23:37:27 +00:00
Fixed more input accessibility issues, also
- Added searchParams based router for easier testing - Added more stories to the storybook
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
import React from 'react';
|
||||
import FieldFunction from '../src/components/FieldFunction';
|
||||
import {action} from '@storybook/addon-actions';
|
||||
import {Wrapper} from './ui';
|
||||
import {withA11y} from '@storybook/addon-a11y';
|
||||
import {latest} from '@mapbox/mapbox-gl-style-spec'
|
||||
|
||||
|
||||
export default {
|
||||
title: 'FieldFunction',
|
||||
component: FieldFunction,
|
||||
decorators: [withA11y],
|
||||
};
|
||||
|
||||
export const Basic = () => {
|
||||
const value = {
|
||||
"property": "rank",
|
||||
"type": "categorical",
|
||||
"default": "#222",
|
||||
"stops": [
|
||||
[
|
||||
{"zoom": 6, "value": ""},
|
||||
["#777"]
|
||||
],
|
||||
[
|
||||
{"zoom": 10, "value": ""},
|
||||
["#444"]
|
||||
]
|
||||
]
|
||||
};
|
||||
|
||||
return <div style={{width: "360px"}}>
|
||||
<FieldFunction
|
||||
onChange={() => {}}
|
||||
value={value}
|
||||
errors={[]}
|
||||
fieldName={"Color"}
|
||||
fieldType={"color"}
|
||||
fieldSpec={latest['paint_fill']['fill-color']}
|
||||
/>
|
||||
</div>
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user