@gamelearn/arcade-components 0.17.2 → 0.17.4
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.
|
@@ -89,7 +89,7 @@ var SlotList = function SlotList(_ref) {
|
|
|
89
89
|
flex: flex,
|
|
90
90
|
currentMessage: currentMessage,
|
|
91
91
|
lodSettings: lodSettings
|
|
92
|
-
}), children
|
|
92
|
+
}), children ? children : /*#__PURE__*/_react.default.createElement(Slots, null));
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
SlotList.propTypes = {
|
|
@@ -90,6 +90,7 @@ var DecisionComponent = function DecisionComponent(_ref) {
|
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
var listProps = _objectSpread(_objectSpread({}, inheritProps), {}, {
|
|
93
|
+
slots: inheritProps.slots ? inheritProps.slots : inheritProps.characters,
|
|
93
94
|
currentMessage: {
|
|
94
95
|
position: -1,
|
|
95
96
|
emotion: ''
|
|
@@ -130,7 +131,7 @@ var DecisionComponent = function DecisionComponent(_ref) {
|
|
|
130
131
|
emitEvent({
|
|
131
132
|
type: 'addPoints',
|
|
132
133
|
payload: rewards,
|
|
133
|
-
finish: !
|
|
134
|
+
finish: !onFinish
|
|
134
135
|
});
|
|
135
136
|
|
|
136
137
|
if (onFinish) {
|
|
@@ -178,11 +179,13 @@ var DecisionComponent = function DecisionComponent(_ref) {
|
|
|
178
179
|
};
|
|
179
180
|
|
|
180
181
|
var CharactersWrapper = function CharactersWrapper(_ref4) {
|
|
182
|
+
var _inheritProps$backgro;
|
|
183
|
+
|
|
181
184
|
var children = _ref4.children;
|
|
182
185
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
183
186
|
className: "conversation arcade-conversation",
|
|
184
187
|
style: inheritProps.background ? {
|
|
185
|
-
backgroundImage: "url(\"".concat(inheritProps.background, "\")")
|
|
188
|
+
backgroundImage: "url(\"".concat((_inheritProps$backgro = inheritProps.background.img) === null || _inheritProps$backgro === void 0 ? void 0 : _inheritProps$backgro.url, "\")")
|
|
186
189
|
} : {}
|
|
187
190
|
}, /*#__PURE__*/_react.default.createElement(_SlotList.default, listProps, children), /*#__PURE__*/_react.default.createElement(_DecisionBody.default, bodyProps));
|
|
188
191
|
};
|