Skip to content

Commit 1e6ef28

Browse files
Hyperkid123rvsia
authored andcommitted
Added TS example to docs.
1 parent 21de0af commit 1e6ef28

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react';
2+
3+
const TsExample = () => {
4+
return (
5+
<iframe
6+
src="https://codesandbox.io/embed/beautiful-silence-9hluy?fontsize=14&hidenavigation=1&theme=dark"
7+
style={{ width: '100%', height: 500, border: 0, borderRadius: 4, overflow: 'hidden' }}
8+
title="ddorg-react-form-renderer-ts-example"
9+
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
10+
sandbox="allow-autoplay allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
11+
></iframe>
12+
);
13+
};
14+
15+
export default TsExample;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
import DocPage from '@docs/doc-page';
2+
import TsExample from '@docs/examples/components/ts-example'
23

34
<DocPage>
45

56
# TypeScript
67

8+
React form renderer and component mappers include Typescript typings. Each exported file has its own definitions.
9+
10+
## Basic TypeScript example
11+
12+
<TsExample />
13+
14+
15+
You can learn more about Renderer and its prop types [here](/components/renderer).
16+
17+
Mapper component prop types are listed in the mappers section of the documentation. You can start with [checkbox](/mappers/checkbox).
18+
719
</DocPage>

0 commit comments

Comments
 (0)