Skip to content

Commit 91a258c

Browse files
committed
Fix docs for complex components like Incubator.TextField
1 parent c20748f commit 91a258c

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/incubator/TextField/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ interface StaticMembers {
7070
}
7171

7272
/**
73-
* @description: TextField component with validation and customization API
73+
* @description: A controlled, customizable TextField with validation support
7474
* @extends: TextInput
7575
* @extendslink: https://reactnative.dev/docs/textinput
7676
* @example: https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/IncubatorTextFieldScreen.tsx

uilib-docs/configurations/pageCreators/createComponentPages.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,20 @@ function getRelevantComponents(edges) {
6464
.filter(e => {
6565
return e.node.displayName !== 'IGNORE';
6666
})
67-
/* Group internal components with parent component */
67+
/* Group internal components with the parent component */
6868
.groupBy(e => e.node.displayName)
69-
.map((groupedEdged, id) => {
70-
if (groupedEdged.length > 1) {
69+
.map((groupedEdge, id) => {
70+
if (groupedEdge.length > 1) {
7171
const edge = {
7272
node: {
7373
displayName: id,
74-
docblock: _.find(groupedEdged, e => !!e.node.docblock),
75-
description: _.find(groupedEdged, e => !!e.node.description),
76-
props: _.reduce(groupedEdged, (props, e) => [...props, ...e.node.props], [])
74+
docblock: _.chain(groupedEdge).find(e => !!e.node.docblock).get('node.docblock').value(),
75+
props: _.reduce(groupedEdge, (props, e) => [...props, ...e.node.props], [])
7776
}
7877
};
7978
return edge;
8079
} else {
81-
return groupedEdged[0];
80+
return groupedEdge[0];
8281
}
8382
})
8483
.value();

0 commit comments

Comments
 (0)