nope/pages/test/test-input.tsx

28 lines
626 B
TypeScript
Raw Normal View History

2020-10-26 08:54:30 +00:00
import DynamicRenderer from '../../resources/ui/dynamic/dynamicRenderer'
2020-10-25 20:14:51 +00:00
2020-10-26 08:54:30 +00:00
const test = () => {
const props = {
schema: {
"type": "object",
"properties": {
"hello": {
"type": "string"
}
},
"required": [
"hello"
]
},
onSubmit: async data => {
console.log(data);
},
onCancel: async err => {
console.log('canceled',err)
2020-10-25 20:14:51 +00:00
}
2020-10-26 08:54:30 +00:00
}
2020-10-25 20:14:51 +00:00
2020-10-26 08:54:30 +00:00
return (<DynamicRenderer component={'DynamicForm'} props={props}/>);
};
export default test