Backdrop and menu

This commit is contained in:
Max Lynch
2020-12-21 15:10:40 -06:00
parent b0aec7fc3d
commit f7974d10ac
6 changed files with 90 additions and 56 deletions
+17
View File
@@ -0,0 +1,17 @@
import classNames from 'classnames';
import { useCallback, useEffect, useState } from 'react';
const Backdrop = ({ open, onClose }) => {
return (
<div
onClick={onClose}
className={classNames('fixed z-10 inset-0 bg-black transition-opacity w-full h-full', {
'pointer-events-none': !open,
'opacity-10': open,
'opacity-0': !open,
})}
></div>
);
};
export default Backdrop;