docs(website): add documentation of exported interfaces to website docs
This commit is contained in:
@@ -71,3 +71,9 @@ import ReactFlow from 'react-flow-renderer';
|
|||||||
### Keys
|
### Keys
|
||||||
- `deleteKeyCode`: default: `8` (backspace)
|
- `deleteKeyCode`: default: `8` (backspace)
|
||||||
- `selectionKeyCode`: default: `16` (shift)
|
- `selectionKeyCode`: default: `16` (shift)
|
||||||
|
|
||||||
|
**Typescript:** The interface of the ReactFlow Prop Types are exported as `ReactFlowProps`. You can use it in your code as follows:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import { ReactFlowProps } from 'react-flow-renderer';
|
||||||
|
```
|
||||||
|
|||||||
@@ -29,3 +29,5 @@ const FlowWithBackground = () => (
|
|||||||
- `color`: string - the color of the dots or lines - default: `#81818a` for dots, `#eee` for lines
|
- `color`: string - the color of the dots or lines - default: `#81818a` for dots, `#eee` for lines
|
||||||
- `style`: css properties
|
- `style`: css properties
|
||||||
- `className`: additional class name
|
- `className`: additional class name
|
||||||
|
|
||||||
|
**Typescript:** The interface of the Background Prop Types are exported as `BackgroundProps`.
|
||||||
@@ -23,3 +23,5 @@ const FlowWithControls = () => (
|
|||||||
- `showInteractive`: boolean - default: true
|
- `showInteractive`: boolean - default: true
|
||||||
- `style`: css properties
|
- `style`: css properties
|
||||||
- `className`: additional class name
|
- `className`: additional class name
|
||||||
|
|
||||||
|
**Typescript:** The interface of the Controls Prop Types are exported as `ControlProps`.
|
||||||
@@ -34,3 +34,5 @@ const FlowWithMiniMap = () => (
|
|||||||
- `maskColor`: string
|
- `maskColor`: string
|
||||||
- `style`: css properties
|
- `style`: css properties
|
||||||
- `className`: additional class name
|
- `className`: additional class name
|
||||||
|
|
||||||
|
**Typescript:** The interface of the MiniMap Prop Types are exported as `MiniMapProps`.
|
||||||
@@ -28,6 +28,8 @@ const targetHandleWithValidation = (
|
|||||||
- `style`: css properties
|
- `style`: css properties
|
||||||
- `className`: additional class name
|
- `className`: additional class name
|
||||||
|
|
||||||
|
**Typescript:** The interface of the Handle Prop Types are exported as `HandleProps`.
|
||||||
|
|
||||||
### Validation
|
### Validation
|
||||||
|
|
||||||
The handle receives the additional class names `connecting` when the connection line is above the handle and `valid` if the connection is valid. You can find an example which uses these classes [here](/examples/validation).
|
The handle receives the additional class names `connecting` when the connection line is above the handle and `valid` if the connection is valid. You can find an example which uses these classes [here](/examples/validation).
|
||||||
|
|||||||
Reference in New Issue
Block a user