@tarojs/components
Version: 
26 lines (21 loc) • 1.04 kB
JavaScript
;
const index = require('./index-ae99cbcc.js');
const indexCss = "taro-text-core{user-select:none;display:inline}taro-text-core[selectable=true],taro-text-core[user-select=true]{user-select:text;display:inline-block}taro-text-core[space]{white-space:pre-wrap}taro-text-core[space=ensp]{word-spacing:.5em}taro-text-core[space=nbsp]{word-spacing:1em}taro-text-core[number-of-lines]{--line-clamp:2;word-wrap:break-word;text-overflow:ellipsis;-webkit-line-clamp:var(--line-clamp);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}";
const Text = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.selectable = false;
    this.userSelect = false;
    this.space = undefined;
    this.numberOfLines = undefined;
  }
  render() {
    const style = {};
    if (typeof this.numberOfLines === 'number') {
      style['--line-clamp'] = this.numberOfLines;
    }
    return (index.h(index.Host, { style: style }, index.h("slot", null)));
  }
};
Text.style = indexCss;
exports.Text = Text;