UNPKG

@tarojs/components

Version:
28 lines (23 loc) 687 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const index = require('./index-dd4b7ba3.js'); const index$1 = require('./index-dffbd352.js'); let Icon = class { constructor(hostRef) { index.registerInstance(this, hostRef); this.size = '23'; } 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;