goblin-laboratory 4.2.13 → 4.3.0
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/lib/carnotzet.js
CHANGED
|
@@ -30,6 +30,9 @@ const logicHandlers = {
|
|
|
30
30
|
}
|
|
31
31
|
return state.set('rootId', widgetId).set('root', widget);
|
|
32
32
|
},
|
|
33
|
+
'change-theme': (state, action) => {
|
|
34
|
+
return state.set('theme', action.get('name'));
|
|
35
|
+
},
|
|
33
36
|
};
|
|
34
37
|
|
|
35
38
|
// Register quest's according rc.json
|
|
@@ -102,6 +105,10 @@ Goblin.registerQuest(goblinName, 'when-ui-crash', function (
|
|
|
102
105
|
);
|
|
103
106
|
});
|
|
104
107
|
|
|
108
|
+
Goblin.registerQuest(goblinName, 'change-theme', function (quest, name) {
|
|
109
|
+
quest.do({name});
|
|
110
|
+
});
|
|
111
|
+
|
|
105
112
|
Goblin.registerQuest(goblinName, 'delete', function* (quest) {
|
|
106
113
|
quest.log.info(`Deleting carnotzet`);
|
|
107
114
|
const state = quest.goblin.getState();
|
package/package.json
CHANGED
|
@@ -33,6 +33,9 @@ export default function mergeStyleDefinitions(styleDefs) {
|
|
|
33
33
|
mapProps: (props, theme) =>
|
|
34
34
|
mapPropsList.reduce((p, mapProps) => mapProps(p, theme), props),
|
|
35
35
|
func: (theme, props) =>
|
|
36
|
-
funcList.reduce(
|
|
36
|
+
funcList.reduce(
|
|
37
|
+
(styles, func) => ({...styles, ...func.bind({styles})(theme, props)}),
|
|
38
|
+
{}
|
|
39
|
+
),
|
|
37
40
|
};
|
|
38
41
|
}
|