Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Allow to define a custom component to use as base of ResizeAware - Added some useless tests
- Loading branch information
Federico Zivolo
committed
Apr 29, 2017
1 parent
8bff18c
commit d22076f
Showing
12 changed files
with
2,464 additions
and
130 deletions.
There are no files selected for viewing
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,3 @@ | ||
{ | ||
"presets": ["es2015", "stage-2", "react" ] | ||
} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.DS_Store | ||
dist/ | ||
node_modules/ | ||
coverage/ |
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,110 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`allows to define a custom component 1`] = ` | ||
<DummyComponent | ||
getRef={[Function]} | ||
style={ | ||
Object { | ||
"position": "relative", | ||
} | ||
} | ||
> | ||
<object | ||
onLoad={[Function]} | ||
style={ | ||
Object { | ||
"display": "block", | ||
"height": "100%", | ||
"left": 0, | ||
"overflow": "hidden", | ||
"pointerEvents": "none", | ||
"position": "absolute", | ||
"top": 0, | ||
"width": "100%", | ||
"zIndex": -1, | ||
} | ||
} | ||
type="text/html" | ||
/> | ||
</DummyComponent> | ||
`; | ||
|
||
exports[`allows to define an \`onResize\` property 1`] = ` | ||
<ResizeAware | ||
component="div" | ||
onResize={[Function]} | ||
style={ | ||
Object { | ||
"position": "relative", | ||
} | ||
} | ||
> | ||
<div | ||
style={ | ||
Object { | ||
"position": "relative", | ||
} | ||
} | ||
> | ||
<object | ||
onLoad={[Function]} | ||
style={ | ||
Object { | ||
"display": "block", | ||
"height": "100%", | ||
"left": 0, | ||
"overflow": "hidden", | ||
"pointerEvents": "none", | ||
"position": "absolute", | ||
"top": 0, | ||
"width": "100%", | ||
"zIndex": -1, | ||
} | ||
} | ||
type="text/html" | ||
/> | ||
</div> | ||
</ResizeAware> | ||
`; | ||
|
||
exports[`allows to use its children as target 1`] = ` | ||
<ResizeAware | ||
component="div" | ||
style={ | ||
Object { | ||
"position": "relative", | ||
} | ||
} | ||
> | ||
<div | ||
style={ | ||
Object { | ||
"position": "relative", | ||
} | ||
} | ||
> | ||
<object | ||
onLoad={[Function]} | ||
style={ | ||
Object { | ||
"display": "block", | ||
"height": "100%", | ||
"left": 0, | ||
"overflow": "hidden", | ||
"pointerEvents": "none", | ||
"position": "absolute", | ||
"top": 0, | ||
"width": "100%", | ||
"zIndex": -1, | ||
} | ||
} | ||
type="text/html" | ||
/> | ||
<DummyComponent> | ||
<div> | ||
x | ||
</div> | ||
</DummyComponent> | ||
</div> | ||
</ResizeAware> | ||
`; |
Oops, something went wrong.