weex-nuke
Version:
基于 Rax 、Weex 的高性能组件体系 ~~
156 lines (148 loc) • 3.66 kB
JavaScript
'use strict';
function VariableFactory(theme) {
var core = theme.Core;
var ComponentCustomStyle = theme.NumberPicker;
/**
* 数量选择器
* @namespace component
* @property module number-picker
* @property tag NumberPicker
* @property category component
*/
var numberPickerVariables = {
/**
* width
* @property namespace size/button
*/
'button-width': core['s-7'],
/**
* height
* @property namespace size/button
*/
'button-height': core['s-7'],
/**
* background
* @property namespace statement/button
*/
'button-bg-color': core['color-fill1-1'],
/**
* size
* @property namespace size/text
*/
'input-size-text': core['font-size-body-1'],
/**
* size
* @property namespace size/icon
*/
'icon-size': core['icon-xs'],
/**
* border
* @property namespace size/button
*/
'button-border-width': core['line-1'],
/**
* border
* @property namespace size/input
*/
'input-border-width': core['line-1'],
/**
* min-width
* @property namespace size/input
*/
'input-min-width': core['s-9'],
/**
* color
* @property namespace statement/input
*/
'input-color': core['color-text1-4'],
/**
* background
* @property namespace statement/input
*/
'input-bg-color': core['color-white'],
/**
* icon
* @property namespace statement/normal
*/
'icon-color': core['color-text1-2'],
/**
* corner
* @property namespace statement/normal
*/
'border-radius': core['corner-2'],
/**
* border-color
* @property namespace statement/button
*/
'button-border-color': core['color-line1-2'],
/**
* border-color
* @property namespace statement/input
*/
'input-border-color': core['color-line1-2'],
/**
* border-style
* @property namespace statement/button
*/
'button-border-style': core['line-solid'],
/**
* border-style
* @property namespace statement/input
*/
'input-border-style': core['line-solid'],
/**
* color
* @property namespace statement/input-error
*/
'input-color-error': core['color-error-2'],
/**
* border
* @property namespace statement/input-error
*/
'input-border-color-error': core['color-error-2'],
/**
* color
* @property namespace statement/input-disabled
*/
'input-color-disabled': core['color-text1-1'],
/**
* background
* @property namespace statement/input-disabled
*/
'input-bg-color-disabled': core['color-fill1-1'],
/**
* icon
* @property namespace statement/disabled
*/
'icon-color-disabled': core['color-text1-1'],
/**
* background
* @property namespace statement/button-disabled
*/
'button-bg-color-disabled': core['color-fill1-1'],
/**
* color
* @property namespace statement/input-focus
*/
'input-color-focus': core['color-text1-4'],
/**
* border-color
* @property namespace statement/input-focus
*/
'input-border-color-focus': core['color-line1-3'],
/**
* padding(l,r)
* @property namespace size/input
*/
'input-padding': core['s-3'],
/**
* background
* @property namespace statement/button-active
*/
'button-bg-color-active': core['color-fill1-3']
};
// should always use var statement to carray a assign
var variable = Object.assign(numberPickerVariables, ComponentCustomStyle);
return variable;
}
module.exports = VariableFactory;