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.

20 lines
477 B

1 year ago
  1. /* eslint-disable */
  2. var style = require('../wxs/style.wxs');
  3. var addUnit = require('../wxs/add-unit.wxs');
  4. function iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) {
  5. var styles = {
  6. 'font-size': addUnit(iconSize),
  7. };
  8. if (checkedColor && value && !disabled && !parentDisabled) {
  9. styles['border-color'] = checkedColor;
  10. styles['background-color'] = checkedColor;
  11. }
  12. return style(styles);
  13. }
  14. module.exports = {
  15. iconStyle: iconStyle,
  16. };