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 styled from 'styled-components'; | |
const Autocomplete = () => { | |
const handleSubmit = (e) => { | |
e.preventDefault(); | |
}; | |
return ( | |
<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
// src/modal.js | |
function ModalContent({ children, title, imageSrc }) { | |
const [isOpen, setIsOpen] = React.useContext(ModalContext); | |
return isOpen ? ( | |
<Overlay onClick={() => setIsOpen(false)}> | |
<div | |
css={{...}} | |
onClick={(e) => e.stopPropagation()} |
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
// src/App.js | |
function App() { | |
return ( | |
<Modal> | |
<ModalOpenButton>Open modal</ModalOpenButton> | |
<ModalContent title="Modal title here!" imageSrc="./forest.jpg"> | |
<p> | |
Modal Content there! | |
</p> |
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
<select> | |
<option value="value1">option a</option> | |
<option value="value2">option b</option> | |
<option value="value3">option c</option> | |
<option value="value4">option d</option> | |
</select> |