@salla.sa/twilight-components
Version:
Salla Web Component
33 lines (29 loc) • 1.84 kB
JavaScript
/*!
* Crafted with ❤ by Salla
*/
import { r as registerInstance, h, H as Host } from './index-BHYtfMwX.js';
const sallaListTileCss = "";
const SallaListTile = class {
constructor(hostRef) {
registerInstance(this, hostRef);
/**
* Designates the component as anchor and applies the `href` attribute.
*/
this.href = undefined;
/**
* Designates the target attribute. This should only be applied when using the `href` prop.
*/
this.target = "_self";
}
generateClass() {
return {
"s-list-tile-item": true,
"s-list-tile-item-href": !!this.href
};
}
render() {
return (h(Host, { key: 'bb33776d01406ff1e04bbdc741312f1a17ac3b7b' }, h("a", { key: '386b417c954bf4b2bac34e40d9bae19db7f61ec3', class: this.generateClass(), href: this.href || "#", target: this.target, "aria-label": "List Tile Link" }, h("div", { key: 'cbcd8c6f92a4cbe7afbd8797c36ae6f529abed1c', class: "s-list-tile-item-icon" }, h("slot", { key: 'bff76fdb467b2491f0c3b40bd7f475eda23fa9c8', name: 'icon' })), h("div", { key: 'c80e7c032abedea8d5929d8bb36a642336724fe1', class: "s-list-tile-item-content" }, h("div", { key: '2bea0273bb4c012e0f9f7ee948b14bc9ea8afc2a', class: "s-list-tile-item-title" }, h("slot", { key: '60c872b9ec9b369ba65452abad7860b3ba6ba640', name: 'title' })), h("div", { key: 'fbb1b6e49284c74f2933f056aa16fcbc25526703', class: "s-list-tile-item-subtitle" }, h("slot", { key: '5ad1bba1b71db13d4deb594ccb0f5898f24d2f23', name: "subtitle" }))), h("div", { key: '96358bf7ed34907a799efd8c6fb2caae6ca02f43', class: "s-list-tile-item-action" }, h("slot", { key: '8d496724103f0c3959845c8f5d4e662a3095c09e', name: 'action' })))));
}
};
SallaListTile.style = sallaListTileCss;
export { SallaListTile as salla_list_tile };