Move files and add minor fixes
This commit is contained in:
parent
6fbc15c402
commit
51c8d06569
16 changed files with 89 additions and 105 deletions
16
src/page/image-anchor/image-anchor.html.ts
Normal file
16
src/page/image-anchor/image-anchor.html.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { url } from '../../types/url';
|
||||
import './image-anchor.scss';
|
||||
|
||||
export const ImageAnchorFactory =
|
||||
(
|
||||
svg: string,
|
||||
title: string,
|
||||
{ shouldDownload = false }: { shouldDownload?: boolean } = {}
|
||||
) =>
|
||||
(href: url) =>
|
||||
`<a rel="noopener" target="_blank" href="${href}" ${
|
||||
shouldDownload ? 'download' : ''
|
||||
} class="image-anchor">
|
||||
${svg}
|
||||
<span>${title}</span>
|
||||
</a>`;
|
||||
Loading…
Add table
Add a link
Reference in a new issue