Skip to content

Commit 9034fd1

Browse files
committed
style(components): add jsdocs
1 parent a307f97 commit 9034fd1

File tree

2 files changed

+25
-16
lines changed

2 files changed

+25
-16
lines changed

src/components/ListItem/index.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@ const sideSpan = { xxl: 1, xl: 1, lg: 1, md: 2, sm: 2, xs: 3 };
99
const isHoveredSpan = { xxl: 1, xl: 1, lg: 1, md: 1, sm: 2, xs: 3 };
1010

1111
/**
12-
* @param {*} props props object
13-
* @param {*} props.name item name
14-
* @param {*} props.avatarBackgroundColor item avatar background color
15-
* @param {*} props.item valid item
16-
* @param {*} props.isSelected select flag
17-
* @param {*} props.onSelectItem select callback
18-
* @param {*} props.onDeselectItem deselect callback
19-
* @param {*} props.renderActions item render actions
20-
* @param {*} props.children item children
21-
* @function
12+
* @function ListItem
2213
* @name ListItem
2314
* @description Generic list item(row) for list component
15+
* @param {object} props props object
16+
* @param {object} props.item valid item
17+
* @param {string} props.name item name
18+
* @param {string} props.avatarBackgroundColor item avatar background color
19+
* @param {boolean} props.isSelected select flag
20+
* @param {Function} props.onSelectItem select callback
21+
* @param {Function} props.onDeselectItem deselect callback
22+
* @param {Function} props.renderActions item render actions
23+
* @param {object[]} props.children item children
2424
* @returns {object} React Component
2525
* @version 0.1.0
2626
* @since 0.1.0
2727
*/
2828
const ListItem = ({
29+
item,
2930
name,
3031
avatarBackgroundColor,
31-
item,
3232
isSelected,
3333
onSelectItem,
3434
onDeselectItem,
@@ -130,11 +130,11 @@ ListItem.propTypes = {
130130
}).isRequired,
131131
name: PropTypes.string,
132132
avatarBackgroundColor: PropTypes.string,
133-
children: PropTypes.node.isRequired,
134-
renderActions: PropTypes.func.isRequired,
135133
isSelected: PropTypes.bool.isRequired,
136134
onSelectItem: PropTypes.func.isRequired,
137135
onDeselectItem: PropTypes.func.isRequired,
136+
renderActions: PropTypes.func.isRequired,
137+
children: PropTypes.node.isRequired,
138138
};
139139

140140
ListItem.defaultProps = {

src/components/SearchableSelectInput/index.js

+12-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,16 @@ const { Option } = Select;
1515
* @class
1616
* @name SearchableSelectInput
1717
* @description Searchable select input
18-
*
18+
* @params {object} props object
19+
* @params {string|function} props.optionLabel option label
20+
* @params {string|function} props.optionValue option
21+
* @params {string|function} props.value selected value
22+
* @params {string|object} props.initialValue initial value
23+
* @params {boolean} props.isFilter filter activation flag
24+
* @params {function} props.onChange value chang callback
25+
* @params {function} props.onSearch search callback
26+
* @params {function} props.onCache cache callback
27+
* @returns {object} React Component
1928
* @version 0.1.0
2029
* @since 0.1.0
2130
*/
@@ -198,8 +207,6 @@ class SearchableSelectInput extends Component {
198207
}
199208

200209
SearchableSelectInput.propTypes = {
201-
onChange: PropTypes.func,
202-
onSearch: PropTypes.func.isRequired,
203210
optionLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func])
204211
.isRequired,
205212
optionValue: PropTypes.oneOfType([
@@ -222,6 +229,8 @@ SearchableSelectInput.propTypes = {
222229
}),
223230
]),
224231
isFilter: PropTypes.bool,
232+
onChange: PropTypes.func,
233+
onSearch: PropTypes.func.isRequired,
225234
onCache: PropTypes.func,
226235
};
227236

0 commit comments

Comments
 (0)