Skip to content

Commit 3d1422e

Browse files
committed
fix: docs
1 parent 78d6bb3 commit 3d1422e

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

src/stories/DocsConfig.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ import Config from '../../docs/config.md?raw';
44

55
<Meta title="Docs/Config" />
66

7-
<Markdown>{Config}</Markdown>
7+
<Markdown>
8+
{Config.replace(
9+
`../src/lib/kit/constants/config.tsx`,
10+
`https://github.com/gravity-ui/dynamic-forms/blob/main/src/lib/kit/constants/config.tsx`,
11+
)}
12+
</Markdown>
File renamed without changes.

src/stories/Readme.mdx

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,19 @@ The JSON Schema-based library for rendering forms and form values.
1212
npm install --save-dev @gravity-ui/dynamic-forms
1313
```
1414

15-
## DOCS
15+
## Usage
1616

17-
- [Config](?path=/docs/docs-config--docs)
18-
- [Spec](?path=/docs/docs-spec--docs)
19-
- [Input props map](?path=/docs/docs-input-props-map--docs)
20-
- [Lib](?path=/docs/docs-lib--docs)
21-
- [How use dynamic forms](?path=/docs/docs-how-use-dynamic-forms--docs)
22-
- [Custom input](?path=/docs/docs-custom-input--docs)
23-
- [Validators](?path=/docs/docs-validators--docs)
24-
- [Mutators](?path=/docs/docs-mutators--docs)
17+
```tsx
18+
import {DynamicField, Spec, dynamicConfig} from '@gravity-ui/dynamic-forms';
19+
20+
// To embed in a final-form
21+
<DynamicField name={name} spec={spec} config={config} />;
22+
23+
import {DynamicView, dynamicViewConfig} from '@gravity-ui/dynamic-forms';
24+
25+
// To get an overview of the values
26+
<DynamicView value={value} spec={spec} config={dynamicViewConfig} />;
27+
```
2528

2629
### I18N
2730

@@ -35,6 +38,17 @@ import {configure, Lang} from '@gravity-ui/dynamic-forms';
3538
configure({lang: Lang.Ru});
3639
```
3740

41+
## DOCS
42+
43+
- [Config](?path=/docs/docs-config--docs)
44+
- [Spec](?path=/docs/docs-spec--docs)
45+
- [Input props map](?path=/docs/docs-input-props-map--docs)
46+
- [Lib](?path=/docs/docs-lib--docs)
47+
- [How use dynamic forms](?path=/docs/docs-how-use-dynamic-forms--docs)
48+
- [Custom input](?path=/docs/docs-custom-input--docs)
49+
- [Validators](?path=/docs/docs-validators--docs)
50+
- [Mutators](?path=/docs/docs-mutators--docs)
51+
3852
## Development
3953

4054
To start the development server with storybook execute the following command:

0 commit comments

Comments
 (0)