@claromentis/design-system
Version:
Claromentis Design System Component Library
100 lines (99 loc) • 2.82 kB
JavaScript
import { h } from '@stencil/core';
/**
* @slot - Allows you to add cla-user-list-items.
*/
export class UserList {
constructor() {
this.styleclass = undefined;
this.title = undefined;
this.href = undefined;
this.plusnumber = undefined;
}
render() {
return (h("div", { class: this.styleclass ? `${this.styleclass} user-list-wrapper` : "user-list-wrapper" }, this.title ? h("h4", { class: "title" }, this.title) : "", h("div", { class: "user-list" }, h("slot", null)), this.plusnumber ? h("div", { class: "plus-number-wrapper" }, h("a", { href: this.href ? `${this.href}` : "javascript:void(0);", class: "plus-number" }, "+", this.plusnumber)) : ""));
}
static get is() { return "cla-user-list"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["cla-user-list.scss"]
};
}
static get styleUrls() {
return {
"$": ["cla-user-list.css"]
};
}
static get properties() {
return {
"styleclass": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Allows styling to be applied to the user-list"
},
"attribute": "styleclass",
"reflect": false
},
"title": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "The text title of the user list (this displays at the top)"
},
"attribute": "title",
"reflect": false
},
"href": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "the link for the + number button, this can be configured to take you to a list of users"
},
"attribute": "href",
"reflect": false
},
"plusnumber": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "the number of additional users not displayed in the list"
},
"attribute": "plusnumber",
"reflect": false
}
};
}
}