weex-nuke
Version:
基于 Rax 、Weex 的高性能组件体系 ~~
108 lines (95 loc) • 3.25 kB
JavaScript
import VariableFactory from './variable';
function styleProvider(theme = {}) {
const Variables = VariableFactory(theme);
const 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;
;