Rename components name

This commit is contained in:
DefectingCat
2023-01-29 09:48:49 +08:00
parent bc00450881
commit 0119f82871
62 changed files with 98 additions and 98 deletions

View File

@ -0,0 +1,29 @@
import clsx from 'clsx';
import { memo, ReactNode } from 'react';
import { FiExternalLink } from 'react-icons/fi';
interface Props {
children: ReactNode;
external?: boolean;
}
const Anchor = ({ children, external = true }: Props) => {
return (
<>
<span
className={clsx(
'mx-[2px] text-teal-500 relative',
'before:left-0 before:top-[1px] before:block before:absolute',
'before:w-full before:h-full before:transition-all before:shadow-underline',
'hover:before:shadow-throughline',
'dark:text-teal-600'
)}
>
{children}
{external && <FiExternalLink className="inline ml-1 mb-[0.2rem]" />}
</span>
</>
);
};
export default memo(Anchor);