A Pen by User-agent Satoshi on CodePen.
Created
August 9, 2023 16:58
-
-
Save Manny27nyc/52b11e8fd26be3721da987dabeff41b4 to your computer and use it in GitHub Desktop.
jOQoYMe
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
<div id="root"> | |
<!-- This div's content will be managed by React. --> | |
</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
function Contacts() { | |
return <div className="Contacts" />; | |
} | |
function Chat() { | |
return <div className="Chat" />; | |
} | |
function SplitPane(props) { | |
return ( | |
<div className="SplitPane"> | |
<div className="SplitPane-left">{props.left}</div> | |
<div className="SplitPane-right">{props.right}</div> | |
</div> | |
); | |
} | |
function App() { | |
return <SplitPane left={<Contacts />} right={<Chat />} />; | |
} | |
ReactDOM.render(<App />, document.getElementById("root")); |
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
<script src="https://unpkg.com/react/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom/umd/react-dom.development.js"></script> |
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
html, | |
body, | |
#root { | |
width: 100%; | |
height: 100%; | |
} | |
.SplitPane { | |
width: 100%; | |
height: 100%; | |
} | |
.SplitPane-left { | |
float: left; | |
width: 30%; | |
height: 100%; | |
} | |
.SplitPane-right { | |
float: left; | |
width: 70%; | |
height: 100%; | |
} | |
.Contacts { | |
width: 100%; | |
height: 100%; | |
background: lightblue; | |
} | |
.Chat { | |
width: 100%; | |
height: 100%; | |
background: pink; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment