mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
20 lines
465 B
TypeScript
20 lines
465 B
TypeScript
import { Mode } from "@prisma/client";
|
|
import { modesShortToLong } from "~/core/stages/stages";
|
|
import { modeToImageUrl } from "~/utils";
|
|
|
|
export interface ModeImageProps
|
|
extends React.ButtonHTMLAttributes<HTMLImageElement> {
|
|
mode: Mode;
|
|
}
|
|
|
|
export function ModeImage({ mode, ...props }: ModeImageProps) {
|
|
return (
|
|
<img
|
|
src={modeToImageUrl(mode)}
|
|
alt={modesShortToLong[mode]}
|
|
title={modesShortToLong[mode]}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|