orchidmap-front/src/components/StickerIcon.tsx
2020-01-08 14:38:20 +07:00

19 lines
392 B
TypeScript

import 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%`,
}}
/>
);
//