diff --git a/client/components/useAsModal.jsx b/client/components/useAsModal.jsx index 5dbeb82a..4e124435 100644 --- a/client/components/useAsModal.jsx +++ b/client/components/useAsModal.jsx @@ -1,11 +1,24 @@ import React from 'react'; +import styled from 'styled-components'; import { useModalBehavior } from '../utils/custom-hooks'; +const BackgroundOverlay = styled.div` + position: absolute; + z-index: 2; + width: 100% !important; + height: 100% !important; + + background: black; + opacity: 0.3; +`; -export default (component) => { - const [visible, trigger, setRef] = useModalBehavior(); +export default (component, hasOverlay = false) => { + const [visible, toggle, setRef] = useModalBehavior(); - const wrapper = () =>