Move files and add minor fixes

This commit is contained in:
Andras Schmelczer 2022-09-24 21:52:25 +02:00
parent 6fbc15c402
commit 51c8d06569
No known key found for this signature in database
GPG key ID: 0EA1BC97D0AB076E
16 changed files with 89 additions and 105 deletions

View file

@ -0,0 +1,23 @@
import { url } from '../../types/url';
import './image-button.scss';
export const ImageButtonFactory =
(
svg: string,
title: string,
{ shouldDownload = false }: { shouldDownload?: boolean } = {}
) =>
(href: url) =>
`
<a class="image-button"
href="${href}"
rel="noopener"
target="_blank"
${shouldDownload ? 'download' : ''}
>
<div class="svg-container">
${svg}
</div>
<p>${title}</p>
</a>
`;