Accessible modal (in React).
npm i @bscop/react-modal
import Modal from "@bscop/react-modal";
function App () {
return (
<Modal
renderContent={
() => {
return (
<div>
<p>This is the content of the modal ...</p>
</div>
);
}
}
renderHook={
(props) => {
return (
<button type="button" {...props}>Show modal</button>
);
}
}
rootId="modal-root"
title="About"
/>
);
}
You can set the following CSS Custom properties to customize the look of the dropdown component:
:root {
--main-color: black;
--main-bg-color: white;
--modal-backdrop-bg-color: rgba(0, 0, 0, .2);
--modal-border-color: rgba(0, 0, 0, .2);
--modal-internal-border-color: #dee2e6;
}
Read the guidelines.
npm test
Coverage reports are hosted on codecov.
npm run badge:coverage -- --token=<guid>
Bruno Scopelliti
www.brunoscopelliti.com