0.1.23 • Published 5 years ago
dvn-antd v0.1.23
Devingen - Form Implementation with Antd Framework
Devingen is a framework for form generation, validation and submit. This library is Devingen form implementation for ReactJS with Ant Design.
Installation
It can be installed with npm npm install dvn-antd
or yarn yarn add dvn-antd
.
Usage
The form fields can be generated with JavaScript classes
import { FieldText, Form } from "dvn-antd";
class SimpleForm extends React.Component {
onSubmit = (data: any): void => {
console.log(data);
}
render() {
const fields = [];
const simpleText = new FieldText('simpleText', 'Simple Text');
simpleText.description = 'Simple text input that can be used for email, first name, last name etc.';
simpleText.placeholder = 'Simple text placeholder';
fields.push(simpleText);
return (
<Form
formData={{ fields }}
onSubmit={this.onSubmit}
submitButtonLabel="Submit"
/>
)
}
}
or with json configuration
import { FieldText, Form } from "dvn-antd";
export class SimpleForm extends React.Component {
onSubmit = (data: any): void => {
console.log(data);
}
render() {
const fields: any[] = [
{
description: 'Simple text input that can be used for email, first name, last name etc.',
id: 'simpleText',
placeholder: 'Simple text placeholder',
title: 'Simple Text',
type: FieldText.type,
}
];
return (
<Form
formData={{ fields }}
onSubmit={this.onSubmit}
submitButtonLabel="Submit"
/>
)
}
}
0.1.23
5 years ago
0.1.22
5 years ago
0.1.21
5 years ago
0.1.20
5 years ago
0.1.19
5 years ago
0.1.17
5 years ago
0.1.16
5 years ago
0.1.15
5 years ago
0.1.14
5 years ago
0.1.13
5 years ago
0.1.12
6 years ago
0.1.11
6 years ago
0.1.10
6 years ago
0.1.9
6 years ago
0.1.8
6 years ago
0.1.7
6 years ago
0.1.6
6 years ago
0.1.5
6 years ago
0.1.4
6 years ago
0.1.3
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago