Adjust chain empty logo (background) (#3470)
* Adjust chain empty logo (background) * Slight adjustment
This commit is contained in:
parent
d951da5647
commit
b4e10c9661
@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="15 15 140 140" style="enable-background:new 0 0 170 170;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.bg0{fill:#888;}
|
||||
</style>
|
||||
<g><circle class="bg0" cx="85" cy="85" r="70"/></g>
|
||||
<style type="text/css">.bg{fill: rgba(255, 255, 255, 0.5)}</style>
|
||||
<g><circle class="bg" cx="85" cy="85" r="70"/></g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 364 B After Width: | Height: | Size: 379 B |
@ -168,22 +168,13 @@ export default React.memo(styled(Menu)`
|
||||
|
||||
&.menuBg,
|
||||
.menuBg {
|
||||
&:after {
|
||||
background: #fff;
|
||||
bottom: 0;
|
||||
content: ' ';
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: -2;
|
||||
}
|
||||
background: white;
|
||||
|
||||
&:before {
|
||||
bottom: 0;
|
||||
content: ' ';
|
||||
left: 0;
|
||||
opacity: 0.125;
|
||||
opacity: 0.1;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
@ -192,9 +183,7 @@ export default React.memo(styled(Menu)`
|
||||
}
|
||||
|
||||
&.isLoading.menuBg {
|
||||
&:after {
|
||||
background: #eee;
|
||||
}
|
||||
background: #eee;
|
||||
|
||||
&:before {
|
||||
filter: grayscale(1);
|
||||
|
||||
@ -19,14 +19,16 @@ function sanitize (value?: string): string {
|
||||
|
||||
function ChainImg ({ className = '', logo, onClick }: Props): React.ReactElement<Props> {
|
||||
const { systemChain, systemName } = useApi();
|
||||
const img = useMemo((): string => {
|
||||
return (namedLogos[logo || ''] || chainLogos[sanitize(systemChain)] || nodeLogos[sanitize(systemName)] || emptyLogo) as string;
|
||||
const [isEmpty, img] = useMemo((): [boolean, string] => {
|
||||
const found: unknown = namedLogos[logo || ''] || chainLogos[sanitize(systemChain)] || nodeLogos[sanitize(systemName)];
|
||||
|
||||
return [!found || logo === 'empty', (found || emptyLogo) as string];
|
||||
}, [logo, systemChain, systemName]);
|
||||
|
||||
return (
|
||||
<img
|
||||
alt='chain logo'
|
||||
className={className}
|
||||
className={`${className}${isEmpty ? ' ui--highlight--bg' : ''}`}
|
||||
onClick={onClick}
|
||||
src={img}
|
||||
/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user