You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
510 B
21 lines
510 B
/* eslint-disable */
|
|
var utils = require('../wxs/utils.wxs');
|
|
|
|
function iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) {
|
|
var styles = [['font-size', utils.addUnit(iconSize)]];
|
|
if (checkedColor && value && !disabled && !parentDisabled) {
|
|
styles.push(['border-color', checkedColor]);
|
|
styles.push(['background-color', checkedColor]);
|
|
}
|
|
|
|
return styles
|
|
.map(function(item) {
|
|
return item.join(':');
|
|
})
|
|
.join(';');
|
|
}
|
|
|
|
module.exports = {
|
|
iconStyle: iconStyle
|
|
};
|