Improve and simplify style
This commit is contained in:
parent
61223c6e42
commit
3bd45f6917
13 changed files with 76 additions and 101 deletions
|
|
@ -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>`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue