mirror of
https://github.com/tjsga/tj-sga-website-react.git
synced 2025-04-21 12:00:17 -04:00
24 lines
403 B
TypeScript
24 lines
403 B
TypeScript
import { Link } from 'react-router-dom';
|
|
|
|
export default function BlueButtonLink({
|
|
href,
|
|
children,
|
|
}: {
|
|
href: string;
|
|
children: React.ReactNode;
|
|
}) {
|
|
if (!href.startsWith('http')) {
|
|
return (
|
|
<Link to={href} className='blue-button'>
|
|
{children}
|
|
</Link>
|
|
);
|
|
} else {
|
|
return (
|
|
<a href={href} target='_blank' rel='noreferrer' className='blue-button'>
|
|
{children}
|
|
</a>
|
|
);
|
|
}
|
|
}
|