UNPKG

@bulmil/core

Version:

![bulmil](https://user-images.githubusercontent.com/2362138/65766959-c721a080-e16f-11e9-9fb9-45a5a2ad0391.jpg)

32 lines (26 loc) 1.33 kB
/*! * Bulmil - MIT License */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const index = require('./index-481858d9.js'); const iconCss = ".icon{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;height:1.5rem;width:1.5rem}.icon.is-small{height:1rem;width:1rem}.icon.is-medium{height:2rem;width:2rem}.icon.is-large{height:3rem;width:3rem}.icon-text{-ms-flex-align:start;align-items:flex-start;color:inherit;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-wrap:wrap;flex-wrap:wrap;line-height:1.5rem;vertical-align:top}.icon-text .icon{-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.icon-text .icon:not(:last-child){margin-right:0.25em}.icon-text .icon:not(:first-child){margin-left:0.25em}div.icon-text{display:-ms-flexbox;display:flex}"; let Icon = class { constructor(hostRef) { index.registerInstance(this, hostRef); /** * Icon text */ this.withText = false; } render() { return (index.h("span", { class: { icon: !this.withText, [this.color]: Boolean(this.color), [this.size]: Boolean(this.size), 'icon-text': this.withText, } }, index.h("slot", null))); } }; Icon.style = iconCss; exports.bm_icon = Icon;