UNPKG

@aliretail/react-materials-components

Version:
48 lines (44 loc) 930 B
--- title: Range order: 90 --- ```jsx import React from 'react'; import ReactDOM from 'react-dom'; import { FormComponents } from '@aliretail/react-materials-components'; const { Range, SchemaForm, SchemaMarkupField: Field, createFormActions } = FormComponents; const App = () => { return ( <SchemaForm components={{ Range }} onChange={console.log} defaultValue={{ readOnly: 512, }} > <Field x-component="Range" title="Range" name="Range" x-component-props={{ min: 0, max: 1024, marks: [0, 512, 1024], }} /> <Field x-component="Range" title="readOnly" name="readOnly" readOnly x-component-props={{ min: 0, max: 1024, marks: [0, 512, 1024], }} /> </SchemaForm> ); }; ReactDOM.render(<App />, mountNode); ```