Add small QR border (#4392)

* Add small QR border

* Missing style...

* Border for networkspecs QR
This commit is contained in:
Jaco Greeff 2021-01-13 15:10:46 +01:00 committed by GitHub
parent 3d35f9271b
commit d28d9c6941
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 2 deletions

View File

@ -168,6 +168,10 @@ export default React.memo(styled(NetworkSpecs)`
.settings--networkSpecs-qr {
margin: 0.25rem auto;
max-width: 15rem;
img {
border: 1px solid white;
}
}
.settings--networkSpecs-name {

View File

@ -264,6 +264,10 @@ export default createGlobalStyle<Props & ThemeProps>(({ theme, uiHighlight }: Pr
padding: 0.5rem 1rem;
}
&.nomargin {
margin-left: 0;
}
&.extraMargin {
margin: 2rem auto;
}

View File

@ -4,7 +4,7 @@
import React, { useCallback, useState } from 'react';
import styled from 'styled-components';
import { Columar, QrDisplayPayload, QrScanSignature, Spinner } from '@polkadot/react-components';
import { Columar, MarkError, QrDisplayPayload, QrScanSignature, Spinner } from '@polkadot/react-components';
import { isHex } from '@polkadot/util';
import { useTranslation } from './translate';
@ -78,7 +78,12 @@ function Qr ({ address, className, genesisHash, isHashed, onSignature, payload }
</div>
</Columar.Column>
</Columar>
{sigError && <article className='error nomargin'>{sigError}</article>}
{sigError && (
<MarkError
className='nomargin'
content={sigError}
/>
)}
</>
);
}
@ -87,5 +92,9 @@ export default React.memo(styled(Qr)`
.qrDisplay {
margin: 0 auto;
max-width: 30rem;
img {
border: 1px solid white;
}
}
`);