Skip to content

Commit ab10812

Browse files
committed
Add comments
1 parent a0b8e19 commit ab10812

File tree

7 files changed

+53
-10
lines changed

7 files changed

+53
-10
lines changed

src/lib/components/CameraContext.react.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ import {CameraContextWrapper} from '@materialsproject/mp-react-components';
22
import React from 'react';
33
import {Component} from 'react';
44

5+
6+
/**
7+
*
8+
* Use this component to synchronize the camera of multiple
9+
* SimpleSceneComponent
10+
*
11+
*
12+
*/
513
export default class CameraContext extends Component {
614
render() {
715
if (!!this.props.children) {
@@ -17,6 +25,9 @@ export default class CameraContext extends Component {
1725
}
1826

1927
CameraContext.propTypes = {
28+
/**
29+
* The ID used to identify this component in Dash callbacks
30+
*/
2031
id: PropTypes.string,
2132
children: PropTypes.any,
2233
};

src/lib/components/MatSidebar.react.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ import {Component} from 'react';
33
import React from 'react';
44
import PropTypes from 'prop-types';
55

6+
7+
/**
8+
*
9+
* Material navigation bar
10+
*
11+
*/
612
export default class MatSidebar extends Component {
713
render() {
814
return (

src/lib/components/search/MatMaterialsTable.react.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ import React from 'react';
55
import {MatPrintViewContext} from './MatPrintViewContext.react';
66

77
const emptyArray = [];
8+
9+
10+
/**
11+
*
12+
* Display a table of materials
13+
*
14+
*/
815
export default class MatMaterialsTable extends Component {
916

1017
render() {

src/lib/components/search/MatPrintViewContext.react.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ import {Component} from 'react';
55
import React from 'react';
66
import PropTypes from 'prop-types';
77

8+
9+
/**
10+
*
11+
* Print view context pass a boolean prop that allows children component to know if
12+
* they are in print-view. Those components can react in various ways ( hidding some elements, changing
13+
* their layouts, and so on... )
14+
*
15+
*/
816
export default class MatPrintViewContext extends Component {
917
render() {
1018
if (!!this.props.children) {

src/lib/components/search/MatSearchGrid.react.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ import {MTGrid} from '@materialsproject/mp-react-components';
33
import PropTypes from 'prop-types';
44
import React from 'react';
55

6+
7+
/**
8+
*
9+
* Use this search grid component if you do not use a periodic table
10+
*
11+
*
12+
*/
613
export default class MatSearchGrid extends Component {
714
render() {
815
return (
@@ -24,11 +31,4 @@ MatSearchGrid.propTypes = {
2431
* to Dash, to make them available for callbacks.
2532
*/
2633
setProps: PropTypes.func,
27-
/**
28-
* An array of object describing the behavior/content of each card
29-
*
30-
*/
31-
/**
32-
* The ID used to identify this component in Dash callbacks.
33-
*/
3434
};

src/lib/components/search/Search.react.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ import React from 'react';
44
import PropTypes from 'prop-types';
55

66

7-
// this a search funnel
8-
7+
/**
8+
*
9+
* This search grid is using the periodic context provider. This allows the grid
10+
* to be notified of changes happening in the periodic table. Use it if you intend
11+
* to use the periodic table
12+
*
13+
*/
914
export default class Search extends Component {
1015
render() {
1116
return (

src/lib/components/search/SearchGrid.react.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ import {Component} from 'react';
33
import React from 'react';
44
import PropTypes from 'prop-types';
55

6-
// this is the whole search page, wrapped in a component
76

7+
8+
/**
9+
*
10+
* This is the whole search page, wrapped in a component
11+
*
12+
*
13+
*/
814
export default class SearchGrid extends Component {
915
render() {
1016
return (

0 commit comments

Comments
 (0)