Skip to content

Commit

Permalink
Modal: fix the space around (#606)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpierre committed Nov 20, 2019
1 parent 5830233 commit 7b6406a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { ButtonIcon } from '../Button/ButtonIcon'
import EscapeOutside from '../EscapeOutside/EscapeOutside'
import RootPortal from '../RootPortal/RootPortal'

const SPACE_AROUND = 4 * GU

function Modal({
children,
onClose,
Expand Down Expand Up @@ -68,7 +70,7 @@ function Modal({
>
<div
css={`
padding: ${2 * GU}px;
padding: ${SPACE_AROUND}px 0;
`}
>
<EscapeOutside
Expand All @@ -78,7 +80,7 @@ function Modal({
css={`
position: relative;
overflow: hidden;
min-width: ${360 - 4 * GU}px;
min-width: ${360 - SPACE_AROUND * 2}px;
background: ${theme.surface};
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
`}
Expand Down Expand Up @@ -141,7 +143,7 @@ Modal.defaultProps = {
closeButton: true,
onClose: noop,
padding: 3 * GU,
width: viewport => Math.min(viewport.width - 6 * GU, 600),
width: viewport => Math.min(viewport.width - SPACE_AROUND * 2, 600),
}

export default Modal

0 comments on commit 7b6406a

Please sign in to comment.