UNPKG

@tarojs/components

Version:
30 lines (25 loc) 744 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const index = require('./index-e751dfe3.js'); const index$1 = require('./index-f6805218.js'); const Icon = class { constructor(hostRef) { index.registerInstance(this, hostRef); this.type = undefined; this.size = '23'; this.color = undefined; } render() { const { type, size, color } = this; const iconType = type === null || type === void 0 ? void 0 : type.replace(/_/g, '-'); const cls = index$1.classnames({ [`weui-icon-${iconType}`]: true }); const style = { 'font-size': `${size}px`, color }; return (index.h(index.Host, { class: cls, style: style })); } }; exports.taro_icon_core = Icon;