@freshworks/crayons
Version:
Crayons Web Components library
34 lines (30 loc) • 1.38 kB
JavaScript
import { attachShadow, h, proxyCustomElement } from '@stencil/core/internal/client';
const customCellAnchorCss = ":host{font-family:var(--fw-font-family, -apple-system, blinkmacsystemfont, \"Segoe UI\", roboto, oxygen, ubuntu, cantarell, \"Open Sans\", \"Helvetica Neue\", sans-serif);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-box-sizing:border-box;box-sizing:border-box}.anchor{color:#2c5cc5;text-decoration:none;font-weight:600;display:inline-block;width:250px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}";
let CustomCellAnchor = class extends HTMLElement {
constructor() {
super();
this.__registerHost();
attachShadow(this);
this.href = '';
this.text = '';
}
render() {
return (h("a", { class: 'anchor', href: this.href }, this.text));
}
static get style() { return customCellAnchorCss; }
};
CustomCellAnchor = /*@__PURE__*/ proxyCustomElement(CustomCellAnchor, [1, "fw-custom-cell-anchor", {
"href": [1],
"text": [1]
}]);
function defineCustomElement() {
const components = ["fw-custom-cell-anchor"];
components.forEach(tagName => { switch (tagName) {
case "fw-custom-cell-anchor":
if (!customElements.get(tagName)) {
customElements.define(tagName, CustomCellAnchor);
}
break;
} });
}
export { CustomCellAnchor as C, defineCustomElement as d };