Refactor
This commit is contained in:
parent
f054546aa6
commit
48a55a4a97
51 changed files with 604 additions and 577 deletions
13
src/framework/primitives/implementations/anchor.ts
Normal file
13
src/framework/primitives/implementations/anchor.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { Primitive } from '../primitive';
|
||||
import { html, url } from '../../../model/misc';
|
||||
|
||||
export class Anchor implements Primitive {
|
||||
public constructor(
|
||||
private readonly href: url,
|
||||
private readonly text: string
|
||||
) {}
|
||||
|
||||
public toHTML(): html {
|
||||
return `<a class="primitive-anchor" href="${this.href}" rel="noreferrer" target="_blank">${this.text}</a>`;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue