UNPKG

@scania/tegel

Version:
78 lines (77 loc) 2.93 kB
import { Host, h } from "@stencil/core"; export class Divider { constructor() { /** Orientation of the Divider, horizontal if not specified. */ this.orientation = 'horizontal'; /** Variant of the Divider, subtle if not specified. */ this.variant = 'subtle'; } render() { return (h(Host, { key: '86cef3b6aacde74bbaa414992cd805058e3b5290', role: "separator", "aria-orientation": this.orientation === 'vertical' ? 'vertical' : undefined }, h("div", { key: 'cd59487dd9214b2635a11ab1a012309a727bd389', class: { 'divider': true, 'vertical': this.orientation === 'vertical', 'horizontal': this.orientation === 'horizontal', 'discrete': this.variant === 'discrete', 'subtle': this.variant === 'subtle', 'soft': this.variant === 'soft', 'defined': this.variant === 'defined', 'dark-blue': this.variant === 'dark-blue', } }))); } static get is() { return "tds-divider"; } static get encapsulation() { return "shadow"; } static get originalStyleUrls() { return { "$": ["divider.scss"] }; } static get styleUrls() { return { "$": ["divider.css"] }; } static get properties() { return { "orientation": { "type": "string", "mutable": false, "complexType": { "original": "'horizontal' | 'vertical'", "resolved": "\"horizontal\" | \"vertical\"", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Orientation of the Divider, horizontal if not specified." }, "getter": false, "setter": false, "reflect": false, "attribute": "orientation", "defaultValue": "'horizontal'" }, "variant": { "type": "string", "mutable": false, "complexType": { "original": "'discrete' | 'subtle' | 'soft' | 'defined' | 'dark-blue'", "resolved": "\"dark-blue\" | \"defined\" | \"discrete\" | \"soft\" | \"subtle\"", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Variant of the Divider, subtle if not specified." }, "getter": false, "setter": false, "reflect": false, "attribute": "variant", "defaultValue": "'subtle'" } }; } }