Improve and simplify style

This commit is contained in:
Andras Schmelczer 2022-09-26 19:50:22 +02:00
parent 61223c6e42
commit 3bd45f6917
No known key found for this signature in database
GPG key ID: 0EA1BC97D0AB076E
13 changed files with 76 additions and 101 deletions

View file

@ -7,17 +7,13 @@ export const ImageButtonFactory =
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>
`;
(href?: url) =>
`<a ${href ? `href="${href}"` : ''}
class="image-button" tabindex="-1" rel="noopener" target="_blank" ${
shouldDownload ? 'download' : ''
}>
<button>
<div class="svg-container">${svg}</div>
<p>${title}</p>
</button>
</a>`;