@rpg-engine/long-bow 0.1.84 → 0.1.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,67 +0,0 @@
1
- import React from 'react';
2
- import styled from 'styled-components';
3
- import iconsAtlasJSON from '../../mocks/atlas/icons/icons.json';
4
- import iconsAtlasIMG from '../../mocks/atlas/icons/icons.png';
5
- import { SpriteFromAtlas } from './SpriteFromAtlas';
6
-
7
- interface IProps {
8
- onClick?: () => void;
9
- spriteKey: string;
10
- baseSpriteKey?: string;
11
- imgStyle?: any;
12
- }
13
-
14
- export const SpriteIcon: React.FC<IProps> = ({
15
- onClick,
16
- spriteKey,
17
- baseSpriteKey,
18
- imgStyle,
19
- }) => {
20
- return (
21
- <Container>
22
- {baseSpriteKey && (
23
- <Slot>
24
- <SpriteFromAtlas
25
- onClick={onClick}
26
- atlasJSON={iconsAtlasJSON}
27
- atlasIMG={iconsAtlasIMG}
28
- spriteKey={baseSpriteKey}
29
- width={32}
30
- height={32}
31
- containerStyle={{
32
- zIndex: -1,
33
- }}
34
- />
35
- </Slot>
36
- )}
37
- <Slot>
38
- <SpriteFromAtlas
39
- onClick={onClick}
40
- atlasJSON={iconsAtlasJSON}
41
- atlasIMG={iconsAtlasIMG}
42
- spriteKey={spriteKey}
43
- width={28}
44
- height={28}
45
- containerStyle={{
46
- zIndex: 0,
47
- }}
48
- imgScale={baseSpriteKey ? 1.5 : 2}
49
- imgStyle={imgStyle}
50
- />
51
- </Slot>
52
- </Container>
53
- );
54
- };
55
-
56
- const Container = styled.div`
57
- position: relative;
58
- width: 32px;
59
- height: 32px;
60
- display: flex;
61
- justify-content: center;
62
- align-items: center;
63
- `;
64
-
65
- const Slot = styled.div`
66
- position: absolute;
67
- `;