@utrecht/web-component-library-stencil
Version:
Stencil component library bundle for the Municipality of Utrecht based on the NL Design System architecture
140 lines (139 loc) • 5.03 kB
JavaScript
/**
* @license EUPL-1.2
* Copyright (c) 2020-2024 Frameless B.V.
* Copyright (c) 2021-2024 Gemeente Utrecht
*/
import { h } from "@stencil/core";
import clsx from "clsx";
export class ButtonLink {
constructor() {
this.appearance = undefined;
this.download = undefined;
this.external = undefined;
this.href = undefined;
this.placeholder = undefined;
this.target = undefined;
}
render() {
return (h("a", { key: 'acf9dc165fd6e4906a5c94e5d7b1c53a90e29491', href: typeof this.href === 'string' && !this.placeholder ? this.href : undefined, class: clsx('utrecht-button-link', 'utrecht-button-link--html-a', this.external && 'utrecht-button-link--external', this.placeholder && 'utrecht-button-link--placeholder', this.appearance === 'primary-action-button' && 'utrecht-button-link--primary-action', this.appearance === 'secondary-action-button' && 'utrecht-button-link--secondary-action', this.appearance === 'subtle-button' && 'utrecht-button-link--subtle'), "aria-disabled": this.placeholder ? 'true' : undefined, download: typeof this.download === 'string' ? this.download : undefined, rel: this.external ? 'external noopener noreferrer' : undefined, role: this.placeholder ? 'link' : undefined, target: typeof this.target === 'string' ? this.target : undefined }, h("slot", { key: '48ca66293f8e887d97b8e62886cee423c4ee2117' })));
}
static get is() { return "utrecht-button-link"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["button-link.scss"]
};
}
static get styleUrls() {
return {
"$": ["button-link.css"]
};
}
static get properties() {
return {
"appearance": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "appearance",
"reflect": false
},
"download": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": ""
},
"attribute": "download",
"reflect": false
},
"external": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "external",
"reflect": false
},
"href": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "href",
"reflect": false
},
"placeholder": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "placeholder",
"reflect": false
},
"target": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": ""
},
"attribute": "target",
"reflect": false
}
};
}
}
//# sourceMappingURL=button-link.js.map