mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* UI customizations: new features Fixes #2905 * colors for graphs * introduce env variable * colors for topbar, stats, selected state and tabs * fix build * fix validator * refactor link.primary.hover color token * refactor selected colors * update styles for switch and fix some color tokens * change color for selectable controls * icon color tokens refactoring * UI customizations: new features Fixes #2905 * test for common components * tweaks * migrate from color-mode-hex cookie to color-theme cookie * clean up * update screenshots * more screenshot updates * update default color of chart line * update envs for mega eth
33 lines
622 B
TypeScript
33 lines
622 B
TypeScript
import React from 'react';
|
|
|
|
import { Link } from 'toolkit/chakra/link';
|
|
import { makePrettyLink } from 'toolkit/utils/url';
|
|
import IconSvg from 'ui/shared/IconSvg';
|
|
|
|
interface Props {
|
|
url?: string | undefined;
|
|
}
|
|
|
|
const WebsiteLink = ({ url }: Props) => {
|
|
if (!url) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Link
|
|
external
|
|
noIcon
|
|
href={ url }
|
|
display="inline-flex"
|
|
alignItems="center"
|
|
columnGap={ 1 }
|
|
mt={ 3 }
|
|
>
|
|
<IconSvg name="link" boxSize={ 5 } color="icon.primary"/>
|
|
<span>{ makePrettyLink(url)?.domain }</span>
|
|
</Link>
|
|
);
|
|
};
|
|
|
|
export default WebsiteLink;
|