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

15 lines
321 B
TypeScript

type Props = {
class?: string;
text: string;
url: string;
};
/** An `<a />` helper component with `target="_blank"` and `rel="noopener"`. */
export function Link(props: Props): TRXComponent {
return (
<a class={props.class} href={props.url} target="_blank" rel="noopener">
{props.text}
</a>
);
}