Skip to content

Commit a4a03c5

Browse files
committed
Add example from #131 to fixtures
1 parent 7e293da commit a4a03c5

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

src/__tests__/__snapshots__/main-test.js.snap

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,37 @@ Object {
8181
},
8282
}
8383
`;
84+
85+
exports[`main fixtures processes component "component_5.js" without errors 1`] = `
86+
Object {
87+
"description": "",
88+
"methods": Array [],
89+
"props": Object {
90+
"children": Object {
91+
"description": "",
92+
"required": true,
93+
"type": Object {
94+
"name": "string",
95+
},
96+
},
97+
"onClick": Object {
98+
"description": "",
99+
"required": false,
100+
"type": Object {
101+
"name": "func",
102+
},
103+
},
104+
"style": Object {
105+
"defaultValue": Object {
106+
"computed": false,
107+
"value": "{}",
108+
},
109+
"description": "",
110+
"required": false,
111+
"type": Object {
112+
"name": "object",
113+
},
114+
},
115+
},
116+
}
117+
`;

src/__tests__/fixtures/component_5.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React from 'react';
2+
3+
const Button = ({ children, onClick, style = {} }) => (
4+
<button
5+
style={{ }}
6+
onClick={onClick}
7+
>
8+
{children}
9+
</button>
10+
);
11+
12+
Button.propTypes = {
13+
children: React.PropTypes.string.isRequired,
14+
onClick: React.PropTypes.func,
15+
style: React.PropTypes.object,
16+
};
17+
18+
export default Button;

0 commit comments

Comments
 (0)