19 lines
321 B
TypeScript
19 lines
321 B
TypeScript
import React from 'react';
|
|
|
|
interface LinkProps {
|
|
className?: string;
|
|
to: string;
|
|
text: string;
|
|
}
|
|
|
|
/**
|
|
* @return {jsx} The root component
|
|
*/
|
|
export default function Link({className, to, text}: LinkProps) {
|
|
className = className || 'btn btn-primary';
|
|
|
|
return (
|
|
<a className={className} href={to}>{text}</a>
|
|
);
|
|
}
|