1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Refactor identicon styles (#8580)

The CSS class for the fallback Ethereum logo used in the identicon
component was with the `AssetList` styles, and was confusingly named
`balance-icon`. It has been migrated to the identicon styles, and
renamed `identicon__eth-logo`.

A few redundant rules have been removed as well (they were always
overridden by inline styles).
This commit is contained in:
Mark Stacey 2020-05-13 09:27:34 -03:00 committed by GitHub
parent fab049b1b0
commit a6d8d3d76e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 10 deletions

View File

@ -62,11 +62,3 @@ $wallet-balance-breakpoint-range: "screen and (min-width: #{$break-large}) and (
}
}
}
.balance-icon {
border-radius: 25px;
width: 50px;
height: 50px;
border: 1px solid $alto;
background: $white;
}

View File

@ -98,7 +98,7 @@ export default class Identicon extends PureComponent {
return (
<img
className={classnames('balance-icon', className)}
className={classnames('identicon__eth-logo', className)}
src="./images/eth_logo.svg"
style={getStyles(diameter)}
/>

View File

@ -19,4 +19,9 @@
border-width: 2px;
border-color: $curious-blue;
}
&__eth-logo {
border: 1px solid $alto;
background: $white;
}
}

View File

@ -21,7 +21,7 @@ describe('Identicon', function () {
<Identicon store={store} />
)
assert.equal(wrapper.find('img.balance-icon').prop('src'), './images/eth_logo.svg')
assert.equal(wrapper.find('img.identicon__eth-logo').prop('src'), './images/eth_logo.svg')
})
it('renders custom image and add className props', function () {