diff --git a/packages/page-accounts/src/Sidebar/Sidebar.tsx b/packages/page-accounts/src/Sidebar/Sidebar.tsx index 427b977408..e0ad9ee481 100644 --- a/packages/page-accounts/src/Sidebar/Sidebar.tsx +++ b/packages/page-accounts/src/Sidebar/Sidebar.tsx @@ -153,6 +153,8 @@ function FullSidebar ({ address, className = '', onClose, onUpdateName }: Props)
@@ -161,6 +163,9 @@ function FullSidebar ({ address, className = '', onClose, onUpdateName }: Props) } export default React.memo(styled(FullSidebar)` + display: flex; + flex-direction: column; + input { width: auto !important; } @@ -193,6 +198,10 @@ export default React.memo(styled(FullSidebar)` margin-bottom: 1.4rem; } + & :last-child { + margin-top: auto; + } + .ui--AddressMenu-sectionHeader { display: inline-flex; color: var(--color-text); diff --git a/packages/react-components/src/LinkExternal.tsx b/packages/react-components/src/LinkExternal.tsx index d01136a2b5..81def5fffc 100644 --- a/packages/react-components/src/LinkExternal.tsx +++ b/packages/react-components/src/LinkExternal.tsx @@ -17,6 +17,7 @@ interface Props { data: BN | number | string; hash?: string; isLogo?: boolean; + isSidebar?: boolean; isSmall?: boolean; type: LinkTypes; } @@ -25,7 +26,7 @@ interface Props { // return `${name[0]}${name[name.length - 1]}`; // } -function genLinks (systemChain: string, { data, hash, isLogo, type }: Props): React.ReactNode[] { +function genLinks (systemChain: string, { data, hash, isLogo, isSidebar, type }: Props): React.ReactNode[] { return Object .entries(externalLinks) .map(([name, { chains, create, isActive, logo, paths, url }]): React.ReactNode | null => { @@ -45,7 +46,12 @@ function genLinks (systemChain: string, { data, hash, isLogo, type }: Props): Re title={`${name}, ${url}`} > {isLogo - ? + ? ( + + ) : name } @@ -54,12 +60,12 @@ function genLinks (systemChain: string, { data, hash, isLogo, type }: Props): Re .filter((node): node is React.ReactNode => !!node); } -function LinkExternal ({ className = '', data, hash, isLogo, isSmall, type }: Props): React.ReactElement | null { +function LinkExternal ({ className = '', data, hash, isLogo, isSidebar, isSmall, type }: Props): React.ReactElement | null { const { t } = useTranslation(); const { systemChain } = useApi(); const links = useMemo( - () => genLinks(systemChain, { data, hash, isLogo, type }), - [systemChain, data, hash, isLogo, type] + () => genLinks(systemChain, { data, hash, isLogo, isSidebar, type }), + [systemChain, data, hash, isLogo, isSidebar, type] ); if (!links.length) { @@ -67,7 +73,7 @@ function LinkExternal ({ className = '', data, hash, isLogo, isSmall, type }: Pr } return ( -
+
{!(isLogo || isSmall) &&
{t('View this externally')}
}
{links.map((link, index) => {link})}
@@ -83,6 +89,10 @@ export default React.memo(styled(LinkExternal)` text-align: center; } + &.isSidebar { + text-align: center; + } + &.isLogo { line-height: 1; @@ -99,6 +109,11 @@ export default React.memo(styled(LinkExternal)` height: 1.5rem; width: 1.5rem; + &.isSidebar { + height: 2rem; + width: 2rem; + } + &:hover { filter: grayscale(0) opacity(1); }