You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/react-renderer-demo/src/pages/development-setup.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,5 +92,37 @@ yarn generate-template
92
92
```
93
93
94
94
This command starts a CLI, that provides an interface for generating mappers. A mapper folder will be created and it will be populated with all neccesary files.
95
+
## Adding form component example
96
+
97
+
To add additional examples of [custom form components](/examples/sample-example), please follow these steps.
98
+
99
+
1. Create a new markdown file in this directory: https://github.com/data-driven-forms/react-forms/tree/master/packages/react-renderer-demo/src/pages/examples.
100
+
2. Wrap the whole content into `DocPage` component:
101
+
```md
102
+
import DocPage from '@docs/doc-page';
103
+
104
+
<DocPage>
105
+
Your content
106
+
</DocPage>
107
+
108
+
```
109
+
3. Add this information to the file:
110
+
1. Description of the component
111
+
2. A problem it may help to solve
112
+
3. Example of the component implementation and usage in a form
113
+
4. To create an example follow these steps:
114
+
1. Create a new JS file in this directory: https://github.com/data-driven-forms/react-forms/tree/master/packages/react-renderer-demo/src/examples/components/examples
115
+
2. Import the code example using this path `components/examples/<file name without extenstion>`
5. Add the component to the navigation. Add a new object to this file: https://github.com/data-driven-forms/react-forms/blob/master/packages/react-renderer-demo/src/components/navigation/schemas/custom-examples.schema.js
125
+
1. Title: text of the link
126
+
2. Component: exact filename of the **markdown file**
0 commit comments