-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
addons/docs/src/frameworks/react/__testfixtures__/8740-ts-multi-props/docgen.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 8740-ts-multi-props 1`] = ` | ||
"import React from 'react'; | ||
export const Header = ({ | ||
size = 'a', | ||
children | ||
}) => React.createElement(\\"div\\", { | ||
className: size | ||
}, children); | ||
export const Paragraph = ({ | ||
size, | ||
children | ||
}) => React.createElement(\\"div\\", { | ||
className: size | ||
}, children); | ||
Paragraph.defaultProps = { | ||
size: 'md' | ||
}; | ||
export const component = Header; | ||
Header.__docgenInfo = { | ||
\\"description\\": \\"\\", | ||
\\"methods\\": [], | ||
\\"displayName\\": \\"Header\\", | ||
\\"props\\": { | ||
\\"size\\": { | ||
\\"defaultValue\\": { | ||
\\"value\\": \\"'a'\\", | ||
\\"computed\\": false | ||
}, | ||
\\"required\\": false | ||
} | ||
} | ||
}; | ||
Paragraph.__docgenInfo = { | ||
\\"description\\": \\"\\", | ||
\\"methods\\": [], | ||
\\"displayName\\": \\"Paragraph\\", | ||
\\"props\\": { | ||
\\"size\\": { | ||
\\"defaultValue\\": { | ||
\\"value\\": \\"'md'\\", | ||
\\"computed\\": false | ||
}, | ||
\\"required\\": false | ||
} | ||
} | ||
};" | ||
`; |
21 changes: 21 additions & 0 deletions
21
addons/docs/src/frameworks/react/__testfixtures__/8740-ts-multi-props/input.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
|
||
export interface ElemAProps { | ||
size?: 'a' | 'b' | 'c' | 'd'; | ||
} | ||
|
||
export const Header: React.SFC<ElemAProps> = ({ size = 'a', children }) => ( | ||
<div className={size}>{children}</div> | ||
); | ||
|
||
export interface ElemBProps { | ||
size?: 'sm' | 'md' | 'lg'; | ||
} | ||
|
||
export const Paragraph: React.SFC<ElemBProps> = ({ size, children }) => ( | ||
<div className={size}>{children}</div> | ||
); | ||
|
||
Paragraph.defaultProps = { size: 'md' }; | ||
|
||
export const component = Header; |
21 changes: 21 additions & 0 deletions
21
addons/docs/src/frameworks/react/__testfixtures__/8740-ts-multi-props/properties.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 8740-ts-multi-props 1`] = ` | ||
Object { | ||
"rows": Array [ | ||
Object { | ||
"defaultValue": Object { | ||
"detail": undefined, | ||
"summary": "'a'", | ||
}, | ||
"description": undefined, | ||
"name": "size", | ||
"required": false, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "unknown", | ||
}, | ||
}, | ||
], | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters