1
Fork 0
tildes-reextended/source/utilities/components/link.tsx

17 lines
354 B
TypeScript
Raw Normal View History

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"`. */
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>
);
}