weex-nuke
Version:
基于 Rax 、Weex 的高性能组件体系 ~~
112 lines (98 loc) • 3.46 kB
JavaScript
var _variable = require('./variable.js');
var _variable2 = _interopRequireDefault(_variable);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function styleProvider() {
var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var Variables = (0, _variable2.default)(theme);
var core = theme.Core;
return {
NumberPicker: {
'number-picker': {
// flex: 1,
flexDirection: 'row',
height: Variables['button-height']
},
'input-wrap': {
outline: 0,
// alignSelf: 'center',
borderRadius: 0,
textAlign: 'center',
boxShadow: 'none',
// width: Variables['input-min-width'],
height: Variables['button-height'],
color: Variables['input-color'],
flex: 1,
// minWidth: Variables['input-min-width'],
paddingLeft: 0,
paddingRight: 0,
fontSize: Variables['input-size-text'],
backgroundColor: Variables['input-bg-color'],
borderWidth: Variables['input-border-width'],
borderStyle: Variables['input-border-style'],
borderColor: Variables['input-border-color']
},
'input-disabled': {
backgroundColor: Variables['input-bg-color-disabled'],
color: Variables['input-color-disabled']
},
input: {
// color:'yellow',
height: Variables['button-height'] - 2 * Variables['input-border-width'],
lineHeight: Variables['button-height'] - 2 * Variables['input-border-width'],
WebkitAppearance: 'none',
backgroundColor: Variables['input-bg-color'],
alignItems: 'center',
textAlign: 'center',
justifyContent: 'center'
},
'input-ff': {
backgroundColor: 'transparent',
width: '100%'
},
reduce: {
justifyContent: 'center',
alignItems: 'center',
width: Variables['button-width'],
height: Variables['button-height'],
backgroundColor: Variables['button-bg-color'],
'backgroundColor:active': Variables['button-bg-color-active'],
borderWidth: Variables['button-border-width'],
borderStyle: Variables['button-border-style'],
borderColor: Variables['button-border-color'],
borderRightWidth: 0
},
icon: {
fontSize: Variables['icon-size'],
color: Variables['icon-color']
},
add: {
justifyContent: 'center',
alignItems: 'center',
width: Variables['button-width'],
height: Variables['button-height'],
backgroundColor: Variables['button-bg-color'],
'backgroundColor:active': Variables['button-bg-color-active'],
borderWidth: Variables['button-border-width'],
borderStyle: Variables['button-border-style'],
borderColor: Variables['button-border-color'],
borderLeftWidth: 0
// marginLeft: -1,
},
'icon-disabled': {
color: Variables['icon-color-disabled']
},
'disabled-button': {
backgroundColor: Variables['button-bg-color-disabled'],
'backgroundColor:active': Variables['button-bg-color-disabled']
},
'error-input-wrap': {
borderColor: Variables['input-border-color-error']
},
'error-input': {
color: Variables['input-color-error']
}
}
};
}
module.exports = styleProvider;
;