weex-nuke
Version:
基于 Rax 、Weex 的高性能组件体系 ~~
45 lines (42 loc) • 1 kB
JavaScript
/**
* @namespace component
* @property name icon
* @property prefix icon-
* @property group Icon
*/
function VariableMix(theme) {
var core = theme.Core;
var ComponentCustomStyle = theme.Icon || {};
var icons = {};
Object.keys(core).map(function (key) {
if (key.indexOf('icon-') > -1 && typeof core[key] === 'string') {
icons[key] = core[key];
}
});
// const iconVariables = {
// /**
// * size
// * @property namespace size/bounding
// */
// 'icon-xs': core['icon-xs'],
// /**
// * size
// * @property namespace size/bounding
// */
// 'icon-s': core['icon-s'],
// /**
// * size
// * @property namespace size/bounding
// */
// 'icon-m': core['icon-m'],
// /**
// * size
// * @property namespace size/bounding
// */
// 'icon-l': core['icon-l'],
// };
var variables = Object.assign(icons, ComponentCustomStyle);
return variables;
}
module.exports = VariableMix;
;