Skip to content

Commit 3906f91

Browse files
committed
New website pages
1 parent 16c33f3 commit 3906f91

18 files changed

+174
-6
lines changed

packages/website/.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
module.exports = {
44
extends: ['../../.eslintrc.cjs', 'plugin:@next/next/recommended'],
5+
root: true,
56
settings: {
67
next: {
78
rootDir: __dirname,

packages/website/pages/docs/reference/_meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"config": "Config",
33
"nodejs": "API",
44
"documentation": "Documentation",
5-
"filestate": "FileState"
5+
"file-state": "FileState",
6+
"handlers": "Handlers"
67
}

packages/website/pages/docs/reference/documentation.mdx

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"basic": "Basic",
3+
"prop-types": "PropTypes",
4+
"typescript": "TypeScript",
5+
"flow": "Flow"
6+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import { Callout } from 'nextra-theme-docs';
2+
3+
# Basic
4+
5+
This describes the return value of react-docgen either from the `parse()` method
6+
or from the CLI output.
7+
8+
For the current TypeScript types you can look at
9+
[github](https://github.com/reactjs/react-docgen/blob/main/packages/react-docgen/src/Documentation.ts)
10+
11+
## Documentation
12+
13+
```ts
14+
interface Documentation {
15+
childContext?: Record<string, PropDescriptor>;
16+
composes?: string[];
17+
context?: Record<string, PropDescriptor>;
18+
description?: string;
19+
displayName?: string;
20+
methods?: MethodDescriptor[];
21+
props?: Record<string, PropDescriptor>;
22+
}
23+
```
24+
25+
### childContext
26+
27+
### composes
28+
29+
**Type**: `string[] | undefined`
30+
31+
If the props of the React component are composed of props which react-docgen was
32+
unable to resolve, the name of types will be listed here.
33+
34+
<Callout type="warning" emoji="🚧">
35+
Create examples
36+
</Callout>
37+
38+
### context
39+
40+
### description
41+
42+
**Type**: `string | undefined`
43+
44+
If the [`componentDocblockHandler`](../handlers/component-docblock-handler) is
45+
active this property will be set to the description of the React component.
46+
47+
### displayName
48+
49+
**Type**: `string | undefined`
50+
51+
If the [`displayNameHandler`](../handlers/display-name-handler) is active this
52+
property will be set to the name of the React component.
53+
54+
### methods
55+
56+
### props
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Flow
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# PropTypes
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# TypeScript
File renamed without changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"code-type-handler": "codeTypeHandler",
3+
"component-docblock-handler": "componentDocblockHandler",
4+
"component-methods-handler": "componentMethodsHandler",
5+
"default-props-handler": "defaultPropsHandler",
6+
"display-name-handler": "displayNameHandler",
7+
"prop-docblock-handler": "propDocblockHandler",
8+
"proptype-composition-handler": "propTypeCompositionHandler",
9+
"proptype-handler": "propTypeHandler"
10+
}

0 commit comments

Comments
 (0)