Download tier list as img (#2638)
Some checks are pending
E2E Tests / e2e (push) Waiting to run
Tests and checks on push / run-checks-and-tests (push) Waiting to run
Updates translation progress / update-translation-progress-issue (push) Waiting to run

Co-authored-by: hfcRed <hfcred@gmx.net>
This commit is contained in:
Kalle
2025-11-17 18:40:22 +02:00
committed by GitHub
parent 187e1aa105
commit 84b4c1d67f
27 changed files with 274 additions and 59 deletions

View File

@@ -34,6 +34,7 @@ interface ImageProps {
testId?: string;
onClick?: () => void;
loading?: "lazy";
forcePng?: boolean;
}
export function Image({
@@ -50,7 +51,32 @@ export function Image({
containerStyle,
onClick,
loading,
forcePng,
}: ImageProps) {
if (forcePng) {
return (
// biome-ignore lint/a11y/noStaticElementInteractions: Biome v2 migration
<div
title={title}
className={containerClassName}
style={containerStyle}
onClick={onClick}
>
<img
alt={alt}
src={`${path}.png`}
className={className}
width={size ?? width}
height={size ?? height}
style={style}
draggable="false"
loading={loading}
data-testid={testId}
/>
</div>
);
}
return (
// biome-ignore lint/a11y/noStaticElementInteractions: Biome v2 migration
<picture