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:
parent
fab049b1b0
commit
a6d8d3d76e
@ -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;
|
|
||||||
}
|
|
||||||
|
@ -98,7 +98,7 @@ export default class Identicon extends PureComponent {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<img
|
<img
|
||||||
className={classnames('balance-icon', className)}
|
className={classnames('identicon__eth-logo', className)}
|
||||||
src="./images/eth_logo.svg"
|
src="./images/eth_logo.svg"
|
||||||
style={getStyles(diameter)}
|
style={getStyles(diameter)}
|
||||||
/>
|
/>
|
||||||
|
@ -19,4 +19,9 @@
|
|||||||
border-width: 2px;
|
border-width: 2px;
|
||||||
border-color: $curious-blue;
|
border-color: $curious-blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__eth-logo {
|
||||||
|
border: 1px solid $alto;
|
||||||
|
background: $white;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ describe('Identicon', function () {
|
|||||||
<Identicon store={store} />
|
<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 () {
|
it('renders custom image and add className props', function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user