keyan 18910fa2ed Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"
This reverts commit d0314ab73c42ebf85fe2f418dddd681af45dbc55.
2023-07-23 09:16:12 -05:00

29 lines
702 B
JavaScript

import { useState } from 'react'
import { Modal } from 'react-bootstrap'
import InfoIcon from '../svgs/information-fill.svg'
export default function Info ({ children, iconClassName = 'fill-theme-color' }) {
const [info, setInfo] = useState()
return (
<>
<Modal
show={info}
onHide={() => setInfo(false)}
>
<div className='modal-close' onClick={() => setInfo(false)}>X</div>
<Modal.Body>
{children}
</Modal.Body>
</Modal>
<InfoIcon
width={18} height={18} className={`${iconClassName} pointer ml-1`}
onClick={(e) => {
e.preventDefault()
setInfo(true)
}}
/>
</>
)
}