@rpg-engine/long-bow 0.1.91 → 0.1.92

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.
Files changed (88) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +181 -181
  3. package/dist/components/Item/Inventory/itemContainerHelper.d.ts +2 -2
  4. package/dist/long-bow.cjs.development.js +49 -2
  5. package/dist/long-bow.cjs.development.js.map +1 -1
  6. package/dist/long-bow.cjs.production.min.js +1 -1
  7. package/dist/long-bow.cjs.production.min.js.map +1 -1
  8. package/dist/long-bow.esm.js +49 -2
  9. package/dist/long-bow.esm.js.map +1 -1
  10. package/package.json +98 -98
  11. package/src/components/Abstractions/SlotsContainer.tsx +42 -42
  12. package/src/components/Button.tsx +30 -30
  13. package/src/components/Chat/Chat.tsx +193 -193
  14. package/src/components/CheckButton.tsx +65 -65
  15. package/src/components/DraggableContainer.tsx +150 -150
  16. package/src/components/Dropdown.tsx +57 -57
  17. package/src/components/Equipment/EquipmentSet.tsx +134 -134
  18. package/src/components/Input.tsx +11 -11
  19. package/src/components/Item/Cards/ItemTooltip.tsx +32 -32
  20. package/src/components/Item/Inventory/ItemContainer.tsx +65 -65
  21. package/src/components/Item/Inventory/ItemContainerTypes.ts +4 -4
  22. package/src/components/Item/Inventory/ItemSlot.tsx +199 -199
  23. package/src/components/Item/Inventory/itemContainerHelper.ts +94 -81
  24. package/src/components/ListMenu.tsx +65 -65
  25. package/src/components/Multitab/Tab.tsx +57 -57
  26. package/src/components/Multitab/TabBody.tsx +13 -13
  27. package/src/components/Multitab/TabsContainer.tsx +97 -97
  28. package/src/components/NPCDialog/NPCDialog.tsx +145 -145
  29. package/src/components/NPCDialog/NPCDialogText.tsx +53 -53
  30. package/src/components/NPCDialog/QuestionDialog/QuestionDialog.tsx +239 -239
  31. package/src/components/ProgressBar.tsx +91 -91
  32. package/src/components/PropertySelect/PropertySelect.tsx +101 -101
  33. package/src/components/PropertySelect/img/ui-arrows/arrow01-left-clicked.png +0 -0
  34. package/src/components/PropertySelect/img/ui-arrows/arrow01-left.png +0 -0
  35. package/src/components/PropertySelect/img/ui-arrows/arrow01-right-clicked.png +0 -0
  36. package/src/components/PropertySelect/img/ui-arrows/arrow01-right.png +0 -0
  37. package/src/components/PropertySelect/img/ui-arrows/arrow02-left-clicked.png +0 -0
  38. package/src/components/PropertySelect/img/ui-arrows/arrow02-left.png +0 -0
  39. package/src/components/PropertySelect/img/ui-arrows/arrow02-right-clicked.png +0 -0
  40. package/src/components/PropertySelect/img/ui-arrows/arrow02-right.png +0 -0
  41. package/src/components/QuestInfo/QuestInfo.tsx +143 -143
  42. package/src/components/RPGUIContainer.tsx +47 -47
  43. package/src/components/RPGUIRoot.tsx +14 -14
  44. package/src/components/RadioButton.tsx +53 -53
  45. package/src/components/RangeSlider.tsx +68 -68
  46. package/src/components/RelativeListMenu.tsx +83 -83
  47. package/src/components/ScrollList.tsx +77 -77
  48. package/src/components/SimpleProgressBar.tsx +62 -62
  49. package/src/components/SkillProgressBar.tsx +123 -123
  50. package/src/components/SkillsContainer.tsx +196 -196
  51. package/src/components/TextArea.tsx +11 -11
  52. package/src/components/Truncate.tsx +25 -25
  53. package/src/components/shared/Column.tsx +16 -16
  54. package/src/components/shared/SpriteFromAtlas.tsx +99 -99
  55. package/src/components/typography/DynamicText.tsx +49 -49
  56. package/src/constants/uiColors.ts +10 -10
  57. package/src/hooks/useEventListener.ts +21 -21
  58. package/src/hooks/useOutsideAlerter.ts +25 -25
  59. package/src/index.tsx +25 -25
  60. package/src/libs/StringHelpers.ts +3 -3
  61. package/src/mocks/atlas/icons/icons.json +735 -735
  62. package/src/mocks/atlas/items/items.json +5215 -5215
  63. package/src/mocks/equipmentSet.mocks.ts +347 -347
  64. package/src/mocks/itemContainer.mocks.ts +249 -249
  65. package/src/mocks/skills.mocks.ts +122 -122
  66. package/src/stories/Button.stories.tsx +36 -36
  67. package/src/stories/Chat.stories.tsx +170 -170
  68. package/src/stories/CheckButton.stories.tsx +48 -48
  69. package/src/stories/DraggableContainer.stories.tsx +28 -28
  70. package/src/stories/Dropdown.stories.tsx +46 -46
  71. package/src/stories/EquipmentSet.stories.tsx +50 -50
  72. package/src/stories/ItemContainer.stories.tsx +50 -50
  73. package/src/stories/ListMenu.stories.tsx +56 -56
  74. package/src/stories/Multitab.stories.tsx +51 -51
  75. package/src/stories/NPCDialog.stories.tsx +130 -130
  76. package/src/stories/ProgressBar.stories.tsx +23 -23
  77. package/src/stories/PropertySelect.stories.tsx +41 -41
  78. package/src/stories/QuestInfo.stories.tsx +76 -76
  79. package/src/stories/RPGUIContainers.stories.tsx +42 -42
  80. package/src/stories/RadioButton.stories.tsx +49 -49
  81. package/src/stories/RangeSlider.stories.tsx +60 -60
  82. package/src/stories/ScrollList.stories.tsx +85 -85
  83. package/src/stories/SimpleProgressBar.stories.tsx +22 -22
  84. package/src/stories/SkillProgressBar.stories.tsx +30 -30
  85. package/src/stories/SkillsContainer.stories.tsx +31 -31
  86. package/src/stories/Text.stories.tsx +42 -42
  87. package/src/types/eventTypes.ts +4 -4
  88. package/src/types/index.d.ts +2 -2
@@ -1,123 +1,123 @@
1
- import { getSPForLevel } from '@rpg-engine/shared';
2
- import React from 'react';
3
- import styled from 'styled-components';
4
- import atlasJSON from '../mocks/atlas/items/items.json';
5
- import atlasIMG from '../mocks/atlas/items/items.png';
6
- import { SpriteFromAtlas } from './shared/SpriteFromAtlas';
7
- import { SimpleProgressBar } from './SimpleProgressBar';
8
-
9
- export interface ISkillProgressBarProps {
10
- skillName: string;
11
- bgColor: string;
12
- level: number;
13
- skillPoints: number;
14
- skillPointsToNextLevel?: number;
15
- texturePath: string;
16
- showSkillPoints?: boolean;
17
- }
18
-
19
- export const SkillProgressBar: React.FC<ISkillProgressBarProps> = ({
20
- bgColor,
21
- skillName,
22
- level,
23
- skillPoints,
24
- texturePath,
25
- showSkillPoints = true,
26
- }) => {
27
- const spForNextLevel = getSPForLevel(level + 1);
28
-
29
- const ratio = (skillPoints / spForNextLevel) * 100;
30
-
31
- return (
32
- <>
33
- <ProgressTitle>
34
- <TitleName>{skillName}</TitleName>
35
- <ValueDisplay>lv {level}</ValueDisplay>
36
- </ProgressTitle>
37
- <ProgressBody>
38
- <ProgressIconContainer>
39
- {atlasIMG && atlasJSON ? (
40
- <SpriteContainer>
41
- <SpriteFromAtlas
42
- atlasIMG={atlasIMG}
43
- atlasJSON={atlasJSON}
44
- spriteKey={texturePath}
45
- imgScale={1}
46
- grayScale
47
- opacity={0.5}
48
- />
49
- </SpriteContainer>
50
- ) : (
51
- <></>
52
- )}
53
- </ProgressIconContainer>
54
-
55
- <ProgressBarContainer>
56
- <SimpleProgressBar value={ratio} bgColor={bgColor} />
57
- </ProgressBarContainer>
58
- </ProgressBody>
59
- {showSkillPoints && (
60
- <SkillDisplayContainer>
61
- <SkillPointsDisplay>
62
- {skillPoints}/{spForNextLevel}
63
- </SkillPointsDisplay>
64
- </SkillDisplayContainer>
65
- )}
66
- </>
67
- );
68
- };
69
-
70
- const ProgressBarContainer = styled.div`
71
- position: relative;
72
- top: 8px;
73
- width: 100%;
74
- height: auto;
75
- `;
76
-
77
- const SpriteContainer = styled.div`
78
- position: relative;
79
- top: -3px;
80
- left: 0;
81
- `;
82
-
83
- const SkillDisplayContainer = styled.div`
84
- margin: 0 auto;
85
-
86
- p {
87
- margin: 0;
88
- }
89
- `;
90
-
91
- const SkillPointsDisplay = styled.p`
92
- font-size: 0.6rem !important;
93
- font-weight: bold;
94
- text-align: center;
95
- `;
96
-
97
- const TitleName = styled.span`
98
- margin-left: 5px;
99
- `;
100
-
101
- const ValueDisplay = styled.span``;
102
-
103
- const ProgressIconContainer = styled.div`
104
- display: flex;
105
- justify-content: center;
106
- align-items: center;
107
- `;
108
-
109
- const ProgressBody = styled.div`
110
- display: flex;
111
- flex-direction: row;
112
- width: 100%;
113
- `;
114
-
115
- const ProgressTitle = styled.div`
116
- width: 100%;
117
- display: flex;
118
- flex-direction: row;
119
- justify-content: space-between;
120
- span {
121
- font-size: 0.6rem;
122
- }
123
- `;
1
+ import { getSPForLevel } from '@rpg-engine/shared';
2
+ import React from 'react';
3
+ import styled from 'styled-components';
4
+ import atlasJSON from '../mocks/atlas/items/items.json';
5
+ import atlasIMG from '../mocks/atlas/items/items.png';
6
+ import { SpriteFromAtlas } from './shared/SpriteFromAtlas';
7
+ import { SimpleProgressBar } from './SimpleProgressBar';
8
+
9
+ export interface ISkillProgressBarProps {
10
+ skillName: string;
11
+ bgColor: string;
12
+ level: number;
13
+ skillPoints: number;
14
+ skillPointsToNextLevel?: number;
15
+ texturePath: string;
16
+ showSkillPoints?: boolean;
17
+ }
18
+
19
+ export const SkillProgressBar: React.FC<ISkillProgressBarProps> = ({
20
+ bgColor,
21
+ skillName,
22
+ level,
23
+ skillPoints,
24
+ texturePath,
25
+ showSkillPoints = true,
26
+ }) => {
27
+ const spForNextLevel = getSPForLevel(level + 1);
28
+
29
+ const ratio = (skillPoints / spForNextLevel) * 100;
30
+
31
+ return (
32
+ <>
33
+ <ProgressTitle>
34
+ <TitleName>{skillName}</TitleName>
35
+ <ValueDisplay>lv {level}</ValueDisplay>
36
+ </ProgressTitle>
37
+ <ProgressBody>
38
+ <ProgressIconContainer>
39
+ {atlasIMG && atlasJSON ? (
40
+ <SpriteContainer>
41
+ <SpriteFromAtlas
42
+ atlasIMG={atlasIMG}
43
+ atlasJSON={atlasJSON}
44
+ spriteKey={texturePath}
45
+ imgScale={1}
46
+ grayScale
47
+ opacity={0.5}
48
+ />
49
+ </SpriteContainer>
50
+ ) : (
51
+ <></>
52
+ )}
53
+ </ProgressIconContainer>
54
+
55
+ <ProgressBarContainer>
56
+ <SimpleProgressBar value={ratio} bgColor={bgColor} />
57
+ </ProgressBarContainer>
58
+ </ProgressBody>
59
+ {showSkillPoints && (
60
+ <SkillDisplayContainer>
61
+ <SkillPointsDisplay>
62
+ {skillPoints}/{spForNextLevel}
63
+ </SkillPointsDisplay>
64
+ </SkillDisplayContainer>
65
+ )}
66
+ </>
67
+ );
68
+ };
69
+
70
+ const ProgressBarContainer = styled.div`
71
+ position: relative;
72
+ top: 8px;
73
+ width: 100%;
74
+ height: auto;
75
+ `;
76
+
77
+ const SpriteContainer = styled.div`
78
+ position: relative;
79
+ top: -3px;
80
+ left: 0;
81
+ `;
82
+
83
+ const SkillDisplayContainer = styled.div`
84
+ margin: 0 auto;
85
+
86
+ p {
87
+ margin: 0;
88
+ }
89
+ `;
90
+
91
+ const SkillPointsDisplay = styled.p`
92
+ font-size: 0.6rem !important;
93
+ font-weight: bold;
94
+ text-align: center;
95
+ `;
96
+
97
+ const TitleName = styled.span`
98
+ margin-left: 5px;
99
+ `;
100
+
101
+ const ValueDisplay = styled.span``;
102
+
103
+ const ProgressIconContainer = styled.div`
104
+ display: flex;
105
+ justify-content: center;
106
+ align-items: center;
107
+ `;
108
+
109
+ const ProgressBody = styled.div`
110
+ display: flex;
111
+ flex-direction: row;
112
+ width: 100%;
113
+ `;
114
+
115
+ const ProgressTitle = styled.div`
116
+ width: 100%;
117
+ display: flex;
118
+ flex-direction: row;
119
+ justify-content: space-between;
120
+ span {
121
+ font-size: 0.6rem;
122
+ }
123
+ `;
@@ -1,196 +1,196 @@
1
- import { ISkill, ISkillDetails } from '@rpg-engine/shared';
2
- import _ from 'lodash';
3
- import React from 'react';
4
- import styled from 'styled-components';
5
- import { colors } from '../constants/uiColors';
6
- import { DraggableContainer } from './DraggableContainer';
7
- import { SkillProgressBar } from './SkillProgressBar';
8
-
9
- export interface ISkillContainerProps {
10
- skill: ISkill;
11
- onCloseButton: () => void;
12
- }
13
-
14
- const skillProps = {
15
- attributes: {
16
- color: colors.cardinal,
17
- values: {
18
- stamina: 'spell-icons/regenerate.png',
19
- magic: 'spell-icons/fireball.png',
20
- magicResistance: 'spell-icons/freeze.png',
21
- strength: 'spell-icons/enchanted-blow.png',
22
- resistance: 'spell-icons/magic-shield.png',
23
- dexterity: 'spell-icons/haste.png',
24
- },
25
- },
26
- combat: {
27
- color: colors.purple,
28
- values: {
29
- first: 'gloves/leather-gloves.png',
30
- club: 'maces/club.png',
31
- sword: 'swords/double-edged-sword.png',
32
- axe: 'axes/double-axe.png',
33
- distance: 'bows/horse-bow.png',
34
- shielding: 'shields/studded-shield.png',
35
- dagger: 'daggers/dagger.png',
36
- },
37
- },
38
- crafting: {
39
- color: colors.blue,
40
- values: {
41
- fishing: 'foods/fish.png',
42
- mining: 'crafting-resources/iron-ingot.png',
43
- lumberjacking: 'crafting-resources/greater-wood-log.png',
44
- cooking: 'foods/chickens-meat.png',
45
- alchemy: 'potions/greater-mana-potion.png',
46
- },
47
- },
48
- };
49
-
50
- export const SkillsContainer: React.FC<ISkillContainerProps> = ({
51
- onCloseButton,
52
- skill,
53
- }) => {
54
- const onRenderSkillCategory = (
55
- category: 'attributes' | 'combat' | 'crafting'
56
- ) => {
57
- const skillCategory = skillProps[category];
58
-
59
- const skillCategoryColor = skillCategory.color;
60
-
61
- const output = [];
62
-
63
- for (const [key, value] of Object.entries(skillCategory.values)) {
64
- //@ts-ignore
65
- const skillDetails = (skill[key] as unknown) as ISkillDetails;
66
-
67
- output.push(
68
- <SkillProgressBar
69
- key={key}
70
- skillName={_.capitalize(key)}
71
- bgColor={skillCategoryColor}
72
- level={skillDetails.level || 0}
73
- skillPoints={Math.round(skillDetails.skillPoints) || 0}
74
- skillPointsToNextLevel={
75
- Math.round(skillDetails.skillPointsToNextLevel) || 0
76
- }
77
- texturePath={value}
78
- />
79
- );
80
- }
81
-
82
- return output;
83
- };
84
-
85
- return (
86
- <SkillsDraggableContainer title="Skills">
87
- {onCloseButton && (
88
- <CloseButton onClick={onCloseButton} onTouchStart={onCloseButton}>
89
- X
90
- </CloseButton>
91
- )}
92
- <SkillSplitDiv>
93
- <p>General</p>
94
- <hr className="golden" />
95
-
96
- <SkillProgressBar
97
- skillName={'Level'}
98
- bgColor={colors.navyBlue}
99
- level={Math.round(skill.level) || 0}
100
- skillPoints={Math.round(skill.experience) || 0}
101
- skillPointsToNextLevel={Math.round(skill.xpToNextLevel) || 0}
102
- texturePath={'swords/broad-sword.png'}
103
- />
104
-
105
- <p>Combat Skills</p>
106
- <hr className="golden" />
107
- </SkillSplitDiv>
108
-
109
- {onRenderSkillCategory('combat')}
110
-
111
- <SkillSplitDiv>
112
- <p>Crafting Skills</p>
113
- <hr className="golden" />
114
- </SkillSplitDiv>
115
-
116
- {onRenderSkillCategory('crafting')}
117
-
118
- <SkillSplitDiv>
119
- <p>Basic Attributes</p>
120
- <hr className="golden" />
121
- </SkillSplitDiv>
122
-
123
- {onRenderSkillCategory('attributes')}
124
-
125
- {/* <SkillSplitDiv>
126
- <p>Magic Skills</p>
127
- <hr className="golden" />
128
- </SkillSplitDiv>
129
- <SkillProgressBar
130
- skillName={'Ice'}
131
- bgColor={'red'}
132
- level={skill?.ice?.level || 0}
133
- skillPoints={skill?.ice?.skillPoints || 0}
134
- skillPointsToNextLevel={skill?.ice?.skillPointsToNextLevel || 0}
135
- texturePath={'spell-icons/freeze.png'}
136
- />
137
- <SkillProgressBar
138
- skillName={'Earth'}
139
- bgColor={'red'}
140
- level={skill?.earth?.level || 0}
141
- skillPoints={skill?.earth?.skillPoints || 0}
142
- skillPointsToNextLevel={skill?.earth?.skillPointsToNextLevel || 0}
143
- texturePath={'spell-icons/earth-barrier.png'}
144
- />
145
- <SkillProgressBar
146
- skillName={'Air'}
147
- bgColor={'red'}
148
- level={skill?.air?.level || 0}
149
- skillPoints={skill?.air?.skillPoints || 0}
150
- skillPointsToNextLevel={skill?.air?.skillPointsToNextLevel || 0}
151
- texturePath={'spell-icons/poison-tornado.png'}
152
- />
153
- <SkillProgressBar
154
- skillName={'Water'}
155
- bgColor={'red'}
156
- level={skill?.water?.level || 0}
157
- skillPoints={skill?.water?.skillPoints || 0}
158
- skillPointsToNextLevel={skill?.water?.skillPointsToNextLevel || 0}
159
- texturePath={'spell-icons/tsunami.png'}
160
- /> */}
161
- </SkillsDraggableContainer>
162
- );
163
- };
164
-
165
- const SkillsDraggableContainer = styled(DraggableContainer)`
166
- border: 1px solid black;
167
- width: 400px;
168
- height: 90%;
169
- overflow-y: scroll;
170
- .DraggableContainer__TitleContainer-sc-184mpyl-2 {
171
- width: auto;
172
- height: auto;
173
- }
174
- `;
175
-
176
- const SkillSplitDiv = styled.div`
177
- width: 100%;
178
- font-size: 11px;
179
- hr {
180
- margin: 0;
181
- margin-bottom: 1rem;
182
- padding: 0px;
183
- }
184
- p {
185
- margin-bottom: 0px;
186
- }
187
- `;
188
-
189
- const CloseButton = styled.div`
190
- position: absolute;
191
- top: 2px;
192
- right: 2px;
193
- color: white;
194
- z-index: 22;
195
- font-size: 0.7rem;
196
- `;
1
+ import { ISkill, ISkillDetails } from '@rpg-engine/shared';
2
+ import _ from 'lodash';
3
+ import React from 'react';
4
+ import styled from 'styled-components';
5
+ import { colors } from '../constants/uiColors';
6
+ import { DraggableContainer } from './DraggableContainer';
7
+ import { SkillProgressBar } from './SkillProgressBar';
8
+
9
+ export interface ISkillContainerProps {
10
+ skill: ISkill;
11
+ onCloseButton: () => void;
12
+ }
13
+
14
+ const skillProps = {
15
+ attributes: {
16
+ color: colors.cardinal,
17
+ values: {
18
+ stamina: 'spell-icons/regenerate.png',
19
+ magic: 'spell-icons/fireball.png',
20
+ magicResistance: 'spell-icons/freeze.png',
21
+ strength: 'spell-icons/enchanted-blow.png',
22
+ resistance: 'spell-icons/magic-shield.png',
23
+ dexterity: 'spell-icons/haste.png',
24
+ },
25
+ },
26
+ combat: {
27
+ color: colors.purple,
28
+ values: {
29
+ first: 'gloves/leather-gloves.png',
30
+ club: 'maces/club.png',
31
+ sword: 'swords/double-edged-sword.png',
32
+ axe: 'axes/double-axe.png',
33
+ distance: 'bows/horse-bow.png',
34
+ shielding: 'shields/studded-shield.png',
35
+ dagger: 'daggers/dagger.png',
36
+ },
37
+ },
38
+ crafting: {
39
+ color: colors.blue,
40
+ values: {
41
+ fishing: 'foods/fish.png',
42
+ mining: 'crafting-resources/iron-ingot.png',
43
+ lumberjacking: 'crafting-resources/greater-wood-log.png',
44
+ cooking: 'foods/chickens-meat.png',
45
+ alchemy: 'potions/greater-mana-potion.png',
46
+ },
47
+ },
48
+ };
49
+
50
+ export const SkillsContainer: React.FC<ISkillContainerProps> = ({
51
+ onCloseButton,
52
+ skill,
53
+ }) => {
54
+ const onRenderSkillCategory = (
55
+ category: 'attributes' | 'combat' | 'crafting'
56
+ ) => {
57
+ const skillCategory = skillProps[category];
58
+
59
+ const skillCategoryColor = skillCategory.color;
60
+
61
+ const output = [];
62
+
63
+ for (const [key, value] of Object.entries(skillCategory.values)) {
64
+ //@ts-ignore
65
+ const skillDetails = (skill[key] as unknown) as ISkillDetails;
66
+
67
+ output.push(
68
+ <SkillProgressBar
69
+ key={key}
70
+ skillName={_.capitalize(key)}
71
+ bgColor={skillCategoryColor}
72
+ level={skillDetails.level || 0}
73
+ skillPoints={Math.round(skillDetails.skillPoints) || 0}
74
+ skillPointsToNextLevel={
75
+ Math.round(skillDetails.skillPointsToNextLevel) || 0
76
+ }
77
+ texturePath={value}
78
+ />
79
+ );
80
+ }
81
+
82
+ return output;
83
+ };
84
+
85
+ return (
86
+ <SkillsDraggableContainer title="Skills">
87
+ {onCloseButton && (
88
+ <CloseButton onClick={onCloseButton} onTouchStart={onCloseButton}>
89
+ X
90
+ </CloseButton>
91
+ )}
92
+ <SkillSplitDiv>
93
+ <p>General</p>
94
+ <hr className="golden" />
95
+
96
+ <SkillProgressBar
97
+ skillName={'Level'}
98
+ bgColor={colors.navyBlue}
99
+ level={Math.round(skill.level) || 0}
100
+ skillPoints={Math.round(skill.experience) || 0}
101
+ skillPointsToNextLevel={Math.round(skill.xpToNextLevel) || 0}
102
+ texturePath={'swords/broad-sword.png'}
103
+ />
104
+
105
+ <p>Combat Skills</p>
106
+ <hr className="golden" />
107
+ </SkillSplitDiv>
108
+
109
+ {onRenderSkillCategory('combat')}
110
+
111
+ <SkillSplitDiv>
112
+ <p>Crafting Skills</p>
113
+ <hr className="golden" />
114
+ </SkillSplitDiv>
115
+
116
+ {onRenderSkillCategory('crafting')}
117
+
118
+ <SkillSplitDiv>
119
+ <p>Basic Attributes</p>
120
+ <hr className="golden" />
121
+ </SkillSplitDiv>
122
+
123
+ {onRenderSkillCategory('attributes')}
124
+
125
+ {/* <SkillSplitDiv>
126
+ <p>Magic Skills</p>
127
+ <hr className="golden" />
128
+ </SkillSplitDiv>
129
+ <SkillProgressBar
130
+ skillName={'Ice'}
131
+ bgColor={'red'}
132
+ level={skill?.ice?.level || 0}
133
+ skillPoints={skill?.ice?.skillPoints || 0}
134
+ skillPointsToNextLevel={skill?.ice?.skillPointsToNextLevel || 0}
135
+ texturePath={'spell-icons/freeze.png'}
136
+ />
137
+ <SkillProgressBar
138
+ skillName={'Earth'}
139
+ bgColor={'red'}
140
+ level={skill?.earth?.level || 0}
141
+ skillPoints={skill?.earth?.skillPoints || 0}
142
+ skillPointsToNextLevel={skill?.earth?.skillPointsToNextLevel || 0}
143
+ texturePath={'spell-icons/earth-barrier.png'}
144
+ />
145
+ <SkillProgressBar
146
+ skillName={'Air'}
147
+ bgColor={'red'}
148
+ level={skill?.air?.level || 0}
149
+ skillPoints={skill?.air?.skillPoints || 0}
150
+ skillPointsToNextLevel={skill?.air?.skillPointsToNextLevel || 0}
151
+ texturePath={'spell-icons/poison-tornado.png'}
152
+ />
153
+ <SkillProgressBar
154
+ skillName={'Water'}
155
+ bgColor={'red'}
156
+ level={skill?.water?.level || 0}
157
+ skillPoints={skill?.water?.skillPoints || 0}
158
+ skillPointsToNextLevel={skill?.water?.skillPointsToNextLevel || 0}
159
+ texturePath={'spell-icons/tsunami.png'}
160
+ /> */}
161
+ </SkillsDraggableContainer>
162
+ );
163
+ };
164
+
165
+ const SkillsDraggableContainer = styled(DraggableContainer)`
166
+ border: 1px solid black;
167
+ width: 400px;
168
+ height: 90%;
169
+ overflow-y: scroll;
170
+ .DraggableContainer__TitleContainer-sc-184mpyl-2 {
171
+ width: auto;
172
+ height: auto;
173
+ }
174
+ `;
175
+
176
+ const SkillSplitDiv = styled.div`
177
+ width: 100%;
178
+ font-size: 11px;
179
+ hr {
180
+ margin: 0;
181
+ margin-bottom: 1rem;
182
+ padding: 0px;
183
+ }
184
+ p {
185
+ margin-bottom: 0px;
186
+ }
187
+ `;
188
+
189
+ const CloseButton = styled.div`
190
+ position: absolute;
191
+ top: 2px;
192
+ right: 2px;
193
+ color: white;
194
+ z-index: 22;
195
+ font-size: 0.7rem;
196
+ `;
@@ -1,11 +1,11 @@
1
- import React from 'react';
2
-
3
- export interface ITextArea
4
- extends React.DetailedHTMLProps<
5
- React.TextareaHTMLAttributes<HTMLTextAreaElement>,
6
- HTMLTextAreaElement
7
- > {}
8
-
9
- export const TextArea: React.FC<ITextArea> = ({ ...props }) => {
10
- return <textarea {...props} />;
11
- };
1
+ import React from 'react';
2
+
3
+ export interface ITextArea
4
+ extends React.DetailedHTMLProps<
5
+ React.TextareaHTMLAttributes<HTMLTextAreaElement>,
6
+ HTMLTextAreaElement
7
+ > {}
8
+
9
+ export const TextArea: React.FC<ITextArea> = ({ ...props }) => {
10
+ return <textarea {...props} />;
11
+ };