Skip to content
This repository was archived by the owner on May 15, 2022. It is now read-only.

Commit 1afb38c

Browse files
committed
Add proper doc comments to DatGuiProps and DatGui typings
1 parent 5a79e4d commit 1afb38c

File tree

1 file changed

+34
-8
lines changed

1 file changed

+34
-8
lines changed

index.d.ts

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,42 @@
11
import * as React from 'react';
22

33
export interface DatGuiProps {
4-
data: any; // The data your dat.GUI controller will mutate
5-
onUpdate: (data: any) => any; // The method which will be called whenever an update is handled by the controller
6-
children: any; // The dat.GUI components that make up the controller
7-
liveUpdate?: boolean; // Determines if live updates should occur, defaults to true
8-
labelWidth?: number; // The width of the labels in pixels, defaults to 40
9-
className?: string; // The class name to set on the DatGui div
10-
style?: StyleSheet; // The style object to set on the DatGui div
4+
/**
5+
* The data your dat.GUI controller will mutate
6+
*/
7+
data: any;
8+
/**
9+
* The method which will be called whenever an update is handled by the controller
10+
*/
11+
onUpdate: (data: any) => any;
12+
/**
13+
* The dat.GUI components that make up the controller
14+
*/
15+
children: any;
16+
/**
17+
* Determines if live updates should occur, defaults to true
18+
*/
19+
liveUpdate?: boolean;
20+
/**
21+
* The width of the labels in pixels, defaults to 40
22+
*/
23+
labelWidth?: number;
24+
/**
25+
* The class name to set on the DatGui div
26+
*/
27+
className?: string;
28+
/**
29+
* The style object to set on the DatGui div
30+
*/
31+
style?: StyleSheet;
1132
}
1233

13-
export default class DatGui extends React.Component<DatGuiProps, any> {}
34+
/**
35+
* A React reimplementation of Google's dat.GUI controller library.
36+
*
37+
* @see https://github.com/claus/react-dat-gui
38+
*/
39+
export default class DatGui extends React.Component<DatGuiProps> {}
1440

1541
export class DatUnchangableFieldProps {
1642
label?: string;

0 commit comments

Comments
 (0)