Fix toggle offset when the dropdown has a label (#626)

* fix toggle offset

* and a forgotten trad

* and a forgotten trad
This commit is contained in:
Thibaut Sardan
2021-01-22 14:23:46 +01:00
committed by GitHub
parent 9040a4bb09
commit ef9ac7b941
4 changed files with 7 additions and 5 deletions
@@ -61,7 +61,7 @@ function ImportLedger ({ className }: Props): React.ReactElement {
const networkOps = useRef(
[{
text: 'Select network',
text: t('Select network'),
value: ''
},
...ledgerChains.map(({ displayName, genesisHash }): NetworkOption => ({
@@ -58,7 +58,7 @@ function Dropdown ({ className, defaultValue, isFocussed, label, onBlur, onChang
);
}
export default React.memo(styled(Dropdown)(({ isError, theme }: Props) => `
export default React.memo(styled(Dropdown)(({ isError, label, theme }: Props) => `
position: relative;
select {
@@ -88,7 +88,7 @@ export default React.memo(styled(Dropdown)(({ isError, theme }: Props) => `
label::after {
content: '';
position: absolute;
top: 50%;
top: ${label ? 'calc(50% + 14px)' : '50%'};
transform: translateY(-50%);
right: 12px;
width: 8px;
@@ -151,5 +151,6 @@
"address index": "",
"Refresh": "",
"Import Account": "",
"Sign on Ledger": ""
"Sign on Ledger": "",
"Select network": ""
}
@@ -151,5 +151,6 @@
"address index": "numéro d'adresse",
"Refresh": "Rafraichir",
"Import Account": "Importer",
"Sign on Ledger": "Signer sur Ledger"
"Sign on Ledger": "Signer sur Ledger",
"Select network": "Sélectionner un réseau"
}