orchidmap-front/src/components/StickerIcon.tsx
2019-02-20 17:52:42 +07:00

19 lines
396 B
TypeScript

import * as React from 'react';
import { STICKERS } from '$constants/stickers';
type Props = {
set: string,
sticker: string,
};
export const StickerIcon = ({ set, sticker }: Props) => (
<div
className="cursor-icon-sticker"
style={{
backgroundImage: `url(${STICKERS[set].url}`,
backgroundPosition: `-${STICKERS[set].layers[sticker].off * 100}% 50%`,
}}
/>
);
//