Skip to content

Commit 7be12bf

Browse files
committed
Add ant mapper to mappers section
1 parent 85224c9 commit 7be12bf

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

packages/react-renderer-demo/src/components/navigation/schemas/mappers.schema.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ const mappersSchema = [
2727
noRoute: true,
2828
title: 'Provided mappers'
2929
},
30+
{
31+
link: 'ant-component-mapper',
32+
linkText: 'Ant Design Mapper'
33+
},
3034
{
3135
link: 'blueprint-component-mapper',
3236
linkText: 'Blueprint mapper'
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import DocPage from '@docs/doc-page';
2+
import ComponentMapperBar from '@docs/component-mapper-bar';
3+
4+
<DocPage>
5+
6+
# Ant Design
7+
8+
<ComponentMapperBar prefix="ant" href="https://ant.design/" />
9+
10+
Ant Design provides components from [Ant Design Design System](https://ant.design/).
11+
12+
## Installation
13+
14+
```bash
15+
npm install --save @data-driven-forms/ant-component-mapper
16+
```
17+
or
18+
```bash
19+
yarn add @data-driven-forms/ant-component-mapper
20+
```
21+
22+
Ant Design has to be installed seperately. Please follow their [guidelines](https://ant.design/docs/react/introduce#Installation).
23+
24+
## ValidateOnMount
25+
26+
Ant Design provides an option to validate a field when the component is mounted. Just set `validateOnMount` to `true`.
27+
28+
```jsx
29+
{
30+
component: 'text-field',
31+
name: 'required-field',
32+
validate: [{type: 'required'}],
33+
validateOnMount: true
34+
}
35+
```
36+
37+
This field will show the error immediately.
38+
39+
## Layout Specification
40+
41+
Ant Design provides horizontal and vertical layouts for form. Layout can be specified by passing a `layout` prop to `formTemplate`. By default it is set to `vertical`.
42+
43+
<!-- ```jsx -->
44+
45+
</DocPage>

0 commit comments

Comments
 (0)