@rpg-engine/long-bow 0.2.6 → 0.2.8
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.
- package/dist/components/Character/CharacterSelection.d.ts +2 -3
- package/dist/components/QuestInfo/QuestInfo.d.ts +5 -6
- package/dist/components/QuestList.d.ts +11 -0
- package/dist/long-bow.cjs.development.js +140 -51
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +140 -51
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/QuestList.stories.d.ts +8 -0
- package/package.json +6 -6
- package/src/components/Character/CharacterSelection.tsx +22 -28
- package/src/components/Item/Inventory/ItemSlot.tsx +31 -11
- package/src/components/PropertySelect/PropertySelect.tsx +9 -1
- package/src/components/QuestInfo/QuestInfo.tsx +135 -42
- package/src/components/QuestList.tsx +124 -0
- package/src/mocks/equipmentSet.mocks.ts +4 -6
- package/src/mocks/itemContainer.mocks.ts +10 -33
- package/src/stories/CharacterSelection.stories.tsx +2 -4
- package/src/stories/QuestInfo.stories.tsx +64 -35
- package/src/stories/QuestList.stories.tsx +54 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface ICharacterProps {
|
|
3
|
-
id: string;
|
|
4
3
|
name: string;
|
|
5
|
-
|
|
4
|
+
textureKey: string;
|
|
6
5
|
}
|
|
7
6
|
export interface ICharacterSelectionProps {
|
|
8
7
|
availableCharacters: ICharacterProps[];
|
|
9
|
-
onChange: (
|
|
8
|
+
onChange: (textureKey: string) => void;
|
|
10
9
|
}
|
|
11
10
|
export declare const CharacterSelection: React.FC<ICharacterSelectionProps>;
|
|
12
11
|
export default CharacterSelection;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
+
import { IQuest } from '@rpg-engine/shared';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
export interface IQuestInfoProps {
|
|
3
|
-
title: string;
|
|
4
|
-
children: React.ReactNode;
|
|
5
4
|
onClose?: () => void;
|
|
6
|
-
button?: Array<
|
|
7
|
-
|
|
5
|
+
button?: Array<IQuestsButtonProps>;
|
|
6
|
+
quests: IQuest[];
|
|
8
7
|
}
|
|
9
|
-
export interface
|
|
8
|
+
export interface IQuestsButtonProps {
|
|
10
9
|
disabled: boolean;
|
|
11
10
|
title: string;
|
|
12
|
-
onClick: () => void;
|
|
11
|
+
onClick: (QuestId: string, NPCId: string) => void;
|
|
13
12
|
}
|
|
14
13
|
export declare const QuestInfo: React.FC<IQuestInfoProps>;
|
|
@@ -20393,7 +20393,18 @@ var PropertySelect = function PropertySelect(_ref) {
|
|
|
20393
20393
|
React.useEffect(function () {
|
|
20394
20394
|
onChange(availableProperties[currentIndex]);
|
|
20395
20395
|
}, [currentIndex]);
|
|
20396
|
-
|
|
20396
|
+
|
|
20397
|
+
var getCurrentSelectionName = function getCurrentSelectionName() {
|
|
20398
|
+
var item = availableProperties[currentIndex];
|
|
20399
|
+
|
|
20400
|
+
if (item) {
|
|
20401
|
+
return item.name;
|
|
20402
|
+
}
|
|
20403
|
+
|
|
20404
|
+
return '';
|
|
20405
|
+
};
|
|
20406
|
+
|
|
20407
|
+
return React__default.createElement(Container$1, null, React__default.createElement(TextOverlay, null, React__default.createElement(Item, null, getCurrentSelectionName())), React__default.createElement("div", {
|
|
20397
20408
|
className: "rpgui-progress-track"
|
|
20398
20409
|
}), React__default.createElement(LeftArrow, {
|
|
20399
20410
|
onClick: onLeftClick
|
|
@@ -20425,43 +20436,39 @@ var RightArrow = /*#__PURE__*/styled.div.withConfig({
|
|
|
20425
20436
|
var CharacterSelection = function CharacterSelection(_ref) {
|
|
20426
20437
|
var availableCharacters = _ref.availableCharacters,
|
|
20427
20438
|
onChange = _ref.onChange;
|
|
20439
|
+
var propertySelectValues = availableCharacters.map(function (item) {
|
|
20440
|
+
return {
|
|
20441
|
+
id: item.textureKey,
|
|
20442
|
+
name: item.name
|
|
20443
|
+
};
|
|
20444
|
+
});
|
|
20428
20445
|
|
|
20429
|
-
var
|
|
20430
|
-
|
|
20431
|
-
|
|
20432
|
-
id: item.id,
|
|
20433
|
-
name: item.name
|
|
20434
|
-
};
|
|
20435
|
-
});
|
|
20436
|
-
};
|
|
20437
|
-
|
|
20438
|
-
var _useState = React.useState(getPropertySelectValues()),
|
|
20439
|
-
propertySelectValues = _useState[0];
|
|
20446
|
+
var _useState = React.useState(),
|
|
20447
|
+
selectedValue = _useState[0],
|
|
20448
|
+
setSelectedValue = _useState[1];
|
|
20440
20449
|
|
|
20441
20450
|
var _useState2 = React.useState(''),
|
|
20442
20451
|
selectedSpriteKey = _useState2[0],
|
|
20443
20452
|
setSelectedSpriteKey = _useState2[1];
|
|
20444
20453
|
|
|
20445
|
-
var
|
|
20446
|
-
|
|
20447
|
-
|
|
20454
|
+
var onSelectedValueChange = function onSelectedValueChange() {
|
|
20455
|
+
var textureKey = selectedValue ? selectedValue.id : '';
|
|
20456
|
+
var spriteKey = textureKey ? textureKey + '/down/standing/0.png' : '';
|
|
20448
20457
|
|
|
20449
|
-
|
|
20450
|
-
|
|
20451
|
-
|
|
20452
|
-
})[0];
|
|
20453
|
-
return character ? character.spriteKey : '';
|
|
20454
|
-
};
|
|
20458
|
+
if (spriteKey == selectedSpriteKey) {
|
|
20459
|
+
return;
|
|
20460
|
+
}
|
|
20455
20461
|
|
|
20456
|
-
var onSelectedValueChange = function onSelectedValueChange() {
|
|
20457
|
-
var spriteKey = getSelectedCharacterSpriteKey();
|
|
20458
20462
|
setSelectedSpriteKey(spriteKey);
|
|
20459
|
-
onChange(
|
|
20463
|
+
onChange(textureKey);
|
|
20460
20464
|
};
|
|
20461
20465
|
|
|
20462
20466
|
React.useEffect(function () {
|
|
20463
20467
|
onSelectedValueChange();
|
|
20464
20468
|
}, [selectedValue]);
|
|
20469
|
+
React.useEffect(function () {
|
|
20470
|
+
setSelectedValue(propertySelectValues[0]);
|
|
20471
|
+
}, [availableCharacters]);
|
|
20465
20472
|
return React__default.createElement(Container$2, null, selectedSpriteKey && React__default.createElement(SpriteFromAtlas, {
|
|
20466
20473
|
spriteKey: selectedSpriteKey,
|
|
20467
20474
|
atlasIMG: img,
|
|
@@ -20470,7 +20477,7 @@ var CharacterSelection = function CharacterSelection(_ref) {
|
|
|
20470
20477
|
height: 50,
|
|
20471
20478
|
width: 50,
|
|
20472
20479
|
containerStyle: {
|
|
20473
|
-
padding: '25px 10px 5px
|
|
20480
|
+
padding: '25px 10px 5px 27px'
|
|
20474
20481
|
}
|
|
20475
20482
|
}), React__default.createElement(PropertySelect, {
|
|
20476
20483
|
availableProperties: propertySelectValues,
|
|
@@ -26304,10 +26311,25 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
26304
26311
|
return '2.5rem';
|
|
26305
26312
|
};
|
|
26306
26313
|
|
|
26314
|
+
var getStackInfo = function getStackInfo(itemId, stackQty) {
|
|
26315
|
+
// if (itemToRender?.isStackable && itemToRender?.stackQty) {
|
|
26316
|
+
if (stackQty > 1) {
|
|
26317
|
+
return React__default.createElement(ItemQty, {
|
|
26318
|
+
left: getLeftPositionValue(stackQty),
|
|
26319
|
+
key: "qty-" + itemId
|
|
26320
|
+
}, ' ', stackQty, ' ');
|
|
26321
|
+
}
|
|
26322
|
+
|
|
26323
|
+
return undefined;
|
|
26324
|
+
};
|
|
26325
|
+
|
|
26307
26326
|
var renderItem = function renderItem(itemToRender) {
|
|
26327
|
+
var _itemToRender$_id, _itemToRender$stackQt;
|
|
26328
|
+
|
|
26308
26329
|
var element = [];
|
|
26309
26330
|
|
|
26310
26331
|
if (itemToRender != null && itemToRender.texturePath) {
|
|
26332
|
+
console.table(itemToRender);
|
|
26311
26333
|
element.push(React__default.createElement(SpriteFromAtlas, {
|
|
26312
26334
|
key: itemToRender._id,
|
|
26313
26335
|
atlasIMG: img$5,
|
|
@@ -26317,11 +26339,10 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
26317
26339
|
}));
|
|
26318
26340
|
}
|
|
26319
26341
|
|
|
26320
|
-
|
|
26321
|
-
|
|
26322
|
-
|
|
26323
|
-
|
|
26324
|
-
}, ' ', itemToRender.stackQty, ' '));
|
|
26342
|
+
var stackInfo = getStackInfo((_itemToRender$_id = itemToRender == null ? void 0 : itemToRender._id) != null ? _itemToRender$_id : '', (_itemToRender$stackQt = itemToRender == null ? void 0 : itemToRender.stackQty) != null ? _itemToRender$stackQt : 0);
|
|
26343
|
+
|
|
26344
|
+
if (stackInfo) {
|
|
26345
|
+
element.push(stackInfo);
|
|
26325
26346
|
}
|
|
26326
26347
|
|
|
26327
26348
|
return element;
|
|
@@ -26331,13 +26352,23 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
26331
26352
|
var _itemToRender$allowed;
|
|
26332
26353
|
|
|
26333
26354
|
if (itemToRender != null && itemToRender.texturePath && (_itemToRender$allowed = itemToRender.allowedEquipSlotType) != null && _itemToRender$allowed.includes(slotSpriteMask)) {
|
|
26334
|
-
|
|
26355
|
+
var _itemToRender$_id2, _itemToRender$stackQt2;
|
|
26356
|
+
|
|
26357
|
+
var element = [];
|
|
26358
|
+
element.push(React__default.createElement(SpriteFromAtlas, {
|
|
26335
26359
|
key: itemToRender._id,
|
|
26336
26360
|
atlasIMG: img$5,
|
|
26337
26361
|
atlasJSON: atlasJSON,
|
|
26338
26362
|
spriteKey: itemToRender.texturePath,
|
|
26339
26363
|
imgScale: 3
|
|
26340
|
-
});
|
|
26364
|
+
}));
|
|
26365
|
+
var stackInfo = getStackInfo((_itemToRender$_id2 = itemToRender == null ? void 0 : itemToRender._id) != null ? _itemToRender$_id2 : '', (_itemToRender$stackQt2 = itemToRender == null ? void 0 : itemToRender.stackQty) != null ? _itemToRender$stackQt2 : 0);
|
|
26366
|
+
|
|
26367
|
+
if (stackInfo) {
|
|
26368
|
+
element.push(stackInfo);
|
|
26369
|
+
}
|
|
26370
|
+
|
|
26371
|
+
return element;
|
|
26341
26372
|
} else {
|
|
26342
26373
|
return React__default.createElement(SpriteFromAtlas, {
|
|
26343
26374
|
atlasIMG: img$5,
|
|
@@ -27042,11 +27073,28 @@ var Container$d = /*#__PURE__*/styled.div.withConfig({
|
|
|
27042
27073
|
var img$8 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLl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IwwTlJj2l7CBgBERKSUUrTaHQ3lcZI6t3G2IZ0pEhvZ7ssww9E4Wym5YUi6qoQioqDZwmB6emxDtg3ej97fXv0nNN64OHQrutbpbGG8o//2/DRwpsyXFsOI9DDjCv0j+oCkNowakR6iXSks+rjURtDhWS9q+1DtMiL5eC41lar9D8w2pQMVrR1nGym7p9hA/25EcrESXchu/wbcQDzxOwDLF0pIXBCe1wAAAABJRU5ErkJggg==';
|
|
27043
27074
|
|
|
27044
27075
|
var QuestInfo = function QuestInfo(_ref) {
|
|
27045
|
-
var
|
|
27076
|
+
var quests = _ref.quests,
|
|
27046
27077
|
onClose = _ref.onClose,
|
|
27047
|
-
button = _ref.button
|
|
27048
|
-
|
|
27049
|
-
|
|
27078
|
+
button = _ref.button;
|
|
27079
|
+
|
|
27080
|
+
var _useState = React.useState(0),
|
|
27081
|
+
currentIndex = _useState[0],
|
|
27082
|
+
setCurrentIndex = _useState[1];
|
|
27083
|
+
|
|
27084
|
+
var questsLength = quests.length - 1;
|
|
27085
|
+
|
|
27086
|
+
var onLeftClick = function onLeftClick() {
|
|
27087
|
+
if (currentIndex === 0) setCurrentIndex(questsLength);else setCurrentIndex(function (index) {
|
|
27088
|
+
return index - 1;
|
|
27089
|
+
});
|
|
27090
|
+
};
|
|
27091
|
+
|
|
27092
|
+
var onRightClick = function onRightClick() {
|
|
27093
|
+
if (currentIndex === questsLength) setCurrentIndex(0);else setCurrentIndex(function (index) {
|
|
27094
|
+
return index + 1;
|
|
27095
|
+
});
|
|
27096
|
+
};
|
|
27097
|
+
|
|
27050
27098
|
return React__default.createElement(QuestDraggableContainer, {
|
|
27051
27099
|
type: exports.RPGUIContainerTypes.Framed,
|
|
27052
27100
|
onCloseButton: function onCloseButton() {
|
|
@@ -27054,53 +27102,94 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
27054
27102
|
},
|
|
27055
27103
|
width: "730px",
|
|
27056
27104
|
cancelDrag: ".equipment-container-body"
|
|
27057
|
-
},
|
|
27105
|
+
}, quests.length >= 2 ? React__default.createElement(QuestsContainer, null, currentIndex !== 0 && React__default.createElement(LeftArrow$1, {
|
|
27106
|
+
onClick: onLeftClick
|
|
27107
|
+
}), currentIndex !== quests.length - 1 && React__default.createElement(RightArrow$1, {
|
|
27108
|
+
onClick: onRightClick
|
|
27109
|
+
}), React__default.createElement(QuestContainer, null, React__default.createElement(TitleContainer$1, {
|
|
27058
27110
|
className: "drag-handler"
|
|
27059
27111
|
}, React__default.createElement(Title$1, null, React__default.createElement(Thumbnail, {
|
|
27060
|
-
src: thumbnail || img$8
|
|
27061
|
-
}), title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
|
|
27112
|
+
src: quests[currentIndex].thumbnail || img$8
|
|
27113
|
+
}), quests[currentIndex].title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
|
|
27062
27114
|
className: "golden"
|
|
27063
|
-
}))), React__default.createElement(Content, null,
|
|
27115
|
+
}))), React__default.createElement(Content, null, React__default.createElement("p", null, quests[currentIndex].description)), React__default.createElement(QuestColumn, {
|
|
27064
27116
|
className: "dark-background",
|
|
27065
27117
|
justifyContent: "flex-end"
|
|
27066
27118
|
}, button && button.map(function (item, index) {
|
|
27067
27119
|
return React__default.createElement(Button, {
|
|
27068
27120
|
key: index,
|
|
27069
|
-
onClick:
|
|
27121
|
+
onClick: function onClick() {
|
|
27122
|
+
return item.onClick(quests[currentIndex]._id, quests[currentIndex].npcId);
|
|
27123
|
+
},
|
|
27070
27124
|
disabled: item.disabled,
|
|
27071
27125
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
27072
27126
|
id: "button-" + index
|
|
27073
27127
|
}, item.title);
|
|
27074
|
-
})))
|
|
27128
|
+
})))) : React__default.createElement(QuestsContainer, null, React__default.createElement(QuestContainer, null, React__default.createElement(TitleContainer$1, {
|
|
27129
|
+
className: "drag-handler"
|
|
27130
|
+
}, React__default.createElement(Title$1, null, React__default.createElement(Thumbnail, {
|
|
27131
|
+
src: quests[0].thumbnail || img$8
|
|
27132
|
+
}), quests[0].title), React__default.createElement(QuestSplitDiv, null, React__default.createElement("hr", {
|
|
27133
|
+
className: "golden"
|
|
27134
|
+
}))), React__default.createElement(Content, null, React__default.createElement("p", null, quests[0].description)), React__default.createElement(QuestColumn, {
|
|
27135
|
+
className: "dark-background",
|
|
27136
|
+
justifyContent: "flex-end"
|
|
27137
|
+
}, button && button.map(function (item, index) {
|
|
27138
|
+
return React__default.createElement(Button, {
|
|
27139
|
+
key: index,
|
|
27140
|
+
onClick: function onClick() {
|
|
27141
|
+
return item.onClick(quests[0]._id, quests[0].npcId);
|
|
27142
|
+
},
|
|
27143
|
+
disabled: item.disabled,
|
|
27144
|
+
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
27145
|
+
id: "button-" + index
|
|
27146
|
+
}, item.title);
|
|
27147
|
+
})))));
|
|
27075
27148
|
};
|
|
27076
27149
|
var QuestDraggableContainer = /*#__PURE__*/styled(DraggableContainer).withConfig({
|
|
27077
27150
|
displayName: "QuestInfo__QuestDraggableContainer",
|
|
27078
27151
|
componentId: "sc-15s2boc-0"
|
|
27079
|
-
})(["border:1px solid black;width:600px;height:500px;
|
|
27152
|
+
})(["border:1px solid black;width:600px;height:500px;padding:0 0 0 0 !important;.DraggableContainer__TitleContainer-sc-184mpyl-2{height:auto;}.container-close{position:sticky;margin-left:auto;top:20px;padding-right:5px;}img{display:inline-block;vertical-align:middle;line-height:normal;}"]);
|
|
27153
|
+
var QuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
27154
|
+
displayName: "QuestInfo__QuestContainer",
|
|
27155
|
+
componentId: "sc-15s2boc-1"
|
|
27156
|
+
})(["margin-right:40px;margin-left:40px;"]);
|
|
27157
|
+
var QuestsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
27158
|
+
displayName: "QuestInfo__QuestsContainer",
|
|
27159
|
+
componentId: "sc-15s2boc-2"
|
|
27160
|
+
})(["display:flex;align-items:center;"]);
|
|
27080
27161
|
var Content = /*#__PURE__*/styled.div.withConfig({
|
|
27081
27162
|
displayName: "QuestInfo__Content",
|
|
27082
|
-
componentId: "sc-15s2boc-
|
|
27163
|
+
componentId: "sc-15s2boc-3"
|
|
27083
27164
|
})(["padding:18px;h1{text-align:left;margin:14px 0px;}"]);
|
|
27084
27165
|
var QuestSplitDiv = /*#__PURE__*/styled.div.withConfig({
|
|
27085
27166
|
displayName: "QuestInfo__QuestSplitDiv",
|
|
27086
|
-
componentId: "sc-15s2boc-
|
|
27167
|
+
componentId: "sc-15s2boc-4"
|
|
27087
27168
|
})(["width:100%;font-size:11px;margin-bottom:10px;hr{margin:0px;padding:0px;}p{margin-bottom:0px;}"]);
|
|
27088
27169
|
var QuestColumn = /*#__PURE__*/styled(Column).withConfig({
|
|
27089
27170
|
displayName: "QuestInfo__QuestColumn",
|
|
27090
|
-
componentId: "sc-15s2boc-
|
|
27091
|
-
})(["background:#4e4a4e;padding-top:5px;
|
|
27171
|
+
componentId: "sc-15s2boc-5"
|
|
27172
|
+
})(["background:#4e4a4e;padding-top:5px;margin-bottom:20px;display:flex;justify-content:space-evenly;"]);
|
|
27092
27173
|
var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
27093
27174
|
displayName: "QuestInfo__TitleContainer",
|
|
27094
|
-
componentId: "sc-15s2boc-
|
|
27095
|
-
})(["background:#4e4a4e;
|
|
27175
|
+
componentId: "sc-15s2boc-6"
|
|
27176
|
+
})(["background:#4e4a4e;width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;"]);
|
|
27096
27177
|
var Title$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
27097
27178
|
displayName: "QuestInfo__Title",
|
|
27098
|
-
componentId: "sc-15s2boc-
|
|
27179
|
+
componentId: "sc-15s2boc-7"
|
|
27099
27180
|
})(["color:white;z-index:22;font-size:0.6rem;"]);
|
|
27100
27181
|
var Thumbnail = /*#__PURE__*/styled.img.withConfig({
|
|
27101
27182
|
displayName: "QuestInfo__Thumbnail",
|
|
27102
|
-
componentId: "sc-15s2boc-
|
|
27183
|
+
componentId: "sc-15s2boc-8"
|
|
27103
27184
|
})(["color:white;z-index:22;font-size:10px;width:64px;margin-right:0.5rem;"]);
|
|
27185
|
+
var LeftArrow$1 = /*#__PURE__*/styled.div.withConfig({
|
|
27186
|
+
displayName: "QuestInfo__LeftArrow",
|
|
27187
|
+
componentId: "sc-15s2boc-9"
|
|
27188
|
+
})(["background-image:url(", ");background-size:100% 100%;left:0;position:absolute;width:40px;height:42px;:active{background-image:url(", ");}"], img$2, img$1);
|
|
27189
|
+
var RightArrow$1 = /*#__PURE__*/styled.div.withConfig({
|
|
27190
|
+
displayName: "QuestInfo__RightArrow",
|
|
27191
|
+
componentId: "sc-15s2boc-10"
|
|
27192
|
+
})(["background-image:url(", ");right:0;position:absolute;width:40px;background-size:100% 100%;height:42px;:active{background-image:url(", ");}"], img$4, img$3);
|
|
27104
27193
|
|
|
27105
27194
|
var InputRadio = function InputRadio(_ref) {
|
|
27106
27195
|
var name = _ref.name,
|