-
-
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
48 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
addons/docs/src/frameworks/react/__testfixtures__/8894-ts-forward-ref/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,22 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 8894-ts-forward-ref 1`] = ` | ||
"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
|
||
import React from 'react'; | ||
|
||
const InnerBox = props => React.createElement(React.Fragment, null, JSON.stringify(props)); | ||
/** | ||
* Use \`Box\` component to handle margins/paddings. | ||
*/ | ||
|
||
|
||
export const Box = React.forwardRef((props, ref) => React.createElement(InnerBox, _extends({}, props, { | ||
ref: ref | ||
}))); | ||
export const component = Box; | ||
Box.__docgenInfo = { | ||
\\"description\\": \\"Use \`Box\` component to handle margins/paddings.\\", | ||
\\"methods\\": [] | ||
};" | ||
`; |
18 changes: 18 additions & 0 deletions
18
addons/docs/src/frameworks/react/__testfixtures__/8894-ts-forward-ref/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,18 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
type Props = { | ||
pt?: number | string; | ||
p?: number | string; | ||
}; | ||
|
||
const InnerBox: React.FC<Props> = props => <>{JSON.stringify(props)}</>; | ||
|
||
/** | ||
* Use `Box` component to handle margins/paddings. | ||
*/ | ||
export const Box: React.FC<Props> = React.forwardRef<HTMLDivElement, Props>((props, ref) => ( | ||
<InnerBox {...props} ref={ref} /> | ||
)); | ||
|
||
export const component = Box; |
7 changes: 7 additions & 0 deletions
7
addons/docs/src/frameworks/react/__testfixtures__/8894-ts-forward-ref/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,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 8894-ts-forward-ref 1`] = ` | ||
Object { | ||
"rows": Array [], | ||
} | ||
`; |
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