weex-nuke
Version:
基于 Rax 、Weex 的高性能组件体系 ~~
69 lines (67 loc) • 1.52 kB
JavaScript
function VariableMix(theme) {
const core = theme.Core;
const ComponentCustomStyle = theme.Badge || {};
/**
* 徽章
* @namespace component
* @property module badge
* @property tag Badge-
* @property category component
*/
const badgeVariables = {
/**
* size
* @property namespace size/bounding
*/
'number-size': core['s-4'],
/**
* padding(l, r)
* @property namespace size/bounding
*/
'number-padding': core['s-1'],
/**
* padding(l, r)
* @property namespace size/bounding
*/
'auto-padding': core['s-2'],
/**
* size
* @property namespace size/text
*/
'number-size-text': core['font-size-caption'],
/**
* text
* @property namespace statement/normal
*/
'number-color': core['color-white'],
/**
* size
* @property namespace size/bounding
*/
'dot-size': core['s-2'],
/**
* background
* @property namespace statement/normal
*/
'normal-bg-color': core['color-error-2'],
/**
* background
* @property namespace statement/normal
*/
'unread-bg-color': core['color-link-1'],
/**
* radius
* @property namespace size/dot
*/
'dot-border-radius': '50%',
/**
* radius
* @property namespace size/number
*/
'number-border-radius': core['s-4'],
};
const variables = Object.assign(badgeVariables, ComponentCustomStyle);
return variables;
}
module.exports = VariableMix;
;