Skip to content
Permalink
Browse files

fix(ui): make sure QR code is centered perfectly

fix #2700
  • Loading branch information...
bolatovumar committed Aug 10, 2019
1 parent d5e957f commit 79cc63509bdeca3851b88f5f8e2b66e18d84e472
Showing with 13 additions and 10 deletions.
  1. +4 −5 renderer/components/UI/QRCode.js
  2. +9 −5 test/unit/components/UI/__snapshots__/QRCode.spec.js.snap
@@ -57,9 +57,11 @@ const BottomRight = styled(CornerCard)`
const CodeWrapper = styled(Box)`
border-style: solid;
border-color: white;
display: inline-flex;
position: absolute;
top: calc(10% - 2px);
left: calc(10% - 2px);
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
filter: ${props => (props.isObfuscated ? 'blur(3px)' : 'none')};
transition: ${props => (props.isObfuscated ? 'none' : 'all 0.5s ease')};
`
@@ -80,9 +82,6 @@ const Code = styled(QRCode)`
border-style: solid;
border-color: white;
border-width: 8px;
position: absolute;
top: calc(10% - 2px);
left: calc(10% - 2px);
`

/**
@@ -92,9 +92,16 @@ exports[`component.UI.QRCode should render correctly 1`] = `
box-sizing: border-box;
border-style: solid;
border-color: white;
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
position: absolute;
top: calc(10% - 2px);
left: calc(10% - 2px);
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
-webkit-filter: none;
filter: none;
-webkit-transition: all 0.5s ease;
@@ -122,9 +129,6 @@ exports[`component.UI.QRCode should render correctly 1`] = `
border-style: solid;
border-color: white;
border-width: 8px;
position: absolute;
top: calc(10% - 2px);
left: calc(10% - 2px);
}

<div

0 comments on commit 79cc635

Please sign in to comment.
You can’t perform that action at this time.