Browse Source

style: larger active area for modal close

renovate/lint-staged-8.x
Tom Kirkpatrick 6 years ago
parent
commit
092f5859b8
No known key found for this signature in database GPG Key ID: 72203A8EC5967EA8
  1. 4
      app/components/UI/Modal.js
  2. 3
      test/unit/components/UI/__snapshots__/Modal.spec.js.snap

4
app/components/UI/Modal.js

@ -36,12 +36,12 @@ class Modal extends React.Component {
<Flex flexDirection="column" width={1} p={3} bg="darkestBackground" css={{ height: '100%' }}> <Flex flexDirection="column" width={1} p={3} bg="darkestBackground" css={{ height: '100%' }}>
<Flex justifyContent="flex-end" as="header" color="primaryText"> <Flex justifyContent="flex-end" as="header" color="primaryText">
<Box <Box
css={{ cursor: 'pointer' }} css={{ cursor: 'pointer', opacity: hover ? 0.6 : 1 }}
ml="auto" ml="auto"
onClick={onClose} onClick={onClose}
onMouseEnter={this.hoverOn} onMouseEnter={this.hoverOn}
onMouseLeave={this.hoverOff} onMouseLeave={this.hoverOff}
color={hover ? 'lightningOrange' : null} p={2}
> >
<X width="2em" height="2em" /> <X width="2em" height="2em" />
</Box> </Box>

3
test/unit/components/UI/__snapshots__/Modal.spec.js.snap

@ -3,7 +3,9 @@
exports[`component.UI.Modal should render correctly 1`] = ` exports[`component.UI.Modal should render correctly 1`] = `
.c2 { .c2 {
margin-left: auto; margin-left: auto;
padding: 8px;
cursor: pointer; cursor: pointer;
opacity: 1;
} }
.c3 { .c3 {
@ -49,7 +51,6 @@ exports[`component.UI.Modal should render correctly 1`] = `
> >
<div <div
className="c2" className="c2"
color={null}
onMouseEnter={[Function]} onMouseEnter={[Function]}
onMouseLeave={[Function]} onMouseLeave={[Function]}
> >

Loading…
Cancel
Save