Merge branch 'toggleshow' of https://github.com/coralproject/talk into toggleshow

This commit is contained in:
Chi Vinh Le
2018-07-20 11:05:59 -03:00
52 changed files with 1062 additions and 149 deletions
@@ -18,13 +18,13 @@ it("renders correctly", () => {
expect(tree).toMatchSnapshot();
});
it("should work correctly", () => {
it("should hide the div", () => {
const renderer = create(
<ToggleShow>
{({ toggleShow, show }) => (
<div>
{show && <div>SHOW ME</div>}
<button onClick={toggleShow}>Click me and I disapear</button>
<button onClick={toggleShow}>Click me and I disappear</button>
</div>
)}
</ToggleShow>
@@ -13,12 +13,12 @@ exports[`renders correctly 1`] = `
</div>
`;
exports[`should work correctly 1`] = `
exports[`should hide the div 1`] = `
<div>
<button
onClick={[Function]}
>
Click me and I disapear
Click me and I disappear
</button>
</div>
`;