This file contains hidden or 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
| // clicking outside of div will hide <p> | |
| const Menu = props => { | |
| const { ref, isComponentVisible } = useComponentVisible(true); | |
| return ( | |
| <div ref={ref}> | |
| {isComponentVisible && <p>{props.children}</p>} | |
| </div> | |
| ); | |
| }; |
This file contains hidden or 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
| import React from "react"; // "react": "^16.8.6", | |
| import Frame, { FrameContextConsumer } from "react-frame-component"; // "react-frame-component": "^4.1.0", | |
| import { StyleSheetManager, withTheme, ThemeProvider } from "styled-components"; // "styled-components": "^3.3.3", | |
| export default withTheme(props => { | |
| const { theme, style = {}, children, ...rest } = props; | |
| return ( | |
| <Frame | |
| style={{ | |
| display: "block", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer