2023-06-24 14:33:33 +00:00
|
|
|
import {type JSX} from "preact";
|
|
|
|
|
2023-06-23 10:52:03 +00:00
|
|
|
type Props = {
|
|
|
|
class?: string;
|
|
|
|
text: string;
|
|
|
|
url: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
/** An `<a />` helper component with `target="_blank"` and `rel="noopener"`. */
|
2023-06-24 14:33:33 +00:00
|
|
|
export function Link(props: Props): JSX.Element {
|
2023-06-23 10:52:03 +00:00
|
|
|
return (
|
|
|
|
<a class={props.class} href={props.url} target="_blank" rel="noopener">
|
|
|
|
{props.text}
|
|
|
|
</a>
|
|
|
|
);
|
|
|
|
}
|