Skip to content

Commit 018a2c2

Browse files
authored
Suggestion of getting component info from all exports
Regarding to this [issue](#13) - it may be a good thing to use this as a new way of getting all exports, as we else never could define more than one export in our React Components. This would be a breaking change.
1 parent 9c32fae commit 018a2c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ function fakeDataForProps (props = {}, { optional = false } = {}) {
248248

249249
module.exports = function (file, { optional = false } = {}) {
250250
const source = fs.readFileSync(file)
251-
const componentInfo = reactDocs.parse(source)
251+
const componentInfo = reactDocs.parse(source, reactDocs.resolver.findAllComponentDefinitions)
252252

253253
return fakeDataForProps(componentInfo.props, { optional })
254254
}

0 commit comments

Comments
 (0)