2021-12-30 22:40:57 +00:00
|
|
|
import {html, Component} from 'htm/preact';
|
|
|
|
|
|
|
|
type Props = {
|
2022-01-03 23:07:30 +00:00
|
|
|
class?: string;
|
2021-12-30 22:40:57 +00:00
|
|
|
text: string;
|
|
|
|
url: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
export default class ExternalAnchor extends Component<Props> {
|
|
|
|
render() {
|
|
|
|
return html`
|
2022-01-03 23:07:30 +00:00
|
|
|
<a
|
|
|
|
class="${this.props.class}"
|
|
|
|
href="${this.props.url}"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
${this.props.text}
|
2021-12-30 22:40:57 +00:00
|
|
|
</a>
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
}
|