@scania/tegel
Version:
Tegel Design System
70 lines (69 loc) • 2.28 kB
JavaScript
import { h, Host } from "@stencil/core";
/**
* @slot <default> - <b>Unnamed slot.</b> For accordion items.
*/
export class TdsAccordion {
constructor() {
this.modeVariant = null;
this.hideLastBorder = false;
}
render() {
return (h(Host, { key: 'c9ecf1a636d34f69a433aa6adac976623739b631', class: {
'tds-accordion': true,
[`tds-mode-variant-${this.modeVariant || ''}`]: Boolean(this.modeVariant),
'hide-last-border': this.hideLastBorder,
} }, h("slot", { key: '4dd6d46024e918a3cd5e7594449147a94d07d6a0' })));
}
static get is() { return "tds-accordion"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["accordion.scss"]
};
}
static get styleUrls() {
return {
"$": ["accordion.css"]
};
}
static get properties() {
return {
"modeVariant": {
"type": "string",
"mutable": false,
"complexType": {
"original": "'primary' | 'secondary'",
"resolved": "\"primary\" | \"secondary\"",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Set the variant of the Accordion."
},
"attribute": "mode-variant",
"reflect": false,
"defaultValue": "null"
},
"hideLastBorder": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Removes the bottom border of the last Accordion item."
},
"attribute": "hide-last-border",
"reflect": false,
"defaultValue": "false"
}
};
}
}