mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-07 08:48:28 +08:00
25 lines
559 B
TypeScript
25 lines
559 B
TypeScript
![]() |
import React from "react";
|
||
|
import { SectionId } from "../domain";
|
||
|
|
||
|
export function SectionIdIcon({
|
||
|
sectionId,
|
||
|
size = 28,
|
||
|
title
|
||
|
}: {
|
||
|
sectionId: SectionId,
|
||
|
size?: number,
|
||
|
title?: string
|
||
|
}) {
|
||
|
return (
|
||
|
<div
|
||
|
title={title}
|
||
|
style={{
|
||
|
display: 'inline-block',
|
||
|
width: size,
|
||
|
height: size,
|
||
|
backgroundImage: `url(${process.env.PUBLIC_URL}/images/sectionids/${sectionId}.png)`,
|
||
|
backgroundSize: size
|
||
|
}}
|
||
|
/>
|
||
|
);
|
||
|
}
|