A Pen by Bryan C Guner on CodePen.
Created
May 28, 2022 23:55
-
-
Save bgoonz/8757a56839f7ddd8ec1b834c22333f0d to your computer and use it in GitHub Desktop.
Example: Fragments
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/@babel/standalone/babel.js"></script> | |
<script src="https://unpkg.com/react/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom/umd/react-dom.development.js"></script> | |
<div id="root"/> | |
<script type="text/babel"> | |
function Example() { | |
return ( | |
<> | |
Some text. | |
<h2>A heading</h2> | |
More text. | |
<h2>Another heading</h2> | |
Even more text. | |
</> | |
); | |
} | |
ReactDOM.render(<Example />, document.getElementById('root')); | |
</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
#modal-container { | |
position: relative; | |
z-index: 999; | |
} | |
.app { | |
height: 10em; | |
width: 10em; | |
background: lightblue; | |
overflow: hidden; | |
} | |
.modal { | |
background-color: rgba(0,0,0,0.5); | |
position: fixed; | |
height: 100%; | |
width: 100%; | |
top: 0; | |
left: 0; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment