mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
22 lines
580 B
TypeScript
22 lines
580 B
TypeScript
import { Link, Icon, chakra } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import arrowIcon from 'icons/arrows/north-east.svg';
|
|
|
|
interface Props {
|
|
href: string;
|
|
className?: string;
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
const LinkExternal = ({ href, children, className }: Props) => {
|
|
return (
|
|
<Link className={ className } fontSize="sm" display="inline-block" alignItems="center" target="_blank" href={ href }>
|
|
{ children }
|
|
<Icon as={ arrowIcon } boxSize={ 4 } verticalAlign="middle"/>
|
|
</Link>
|
|
);
|
|
};
|
|
|
|
export default React.memo(chakra(LinkExternal));
|