@claromentis/design-system
Version:
Claromentis Design System Component Library
153 lines (152 loc) • 4.39 kB
JavaScript
import { h } from '@stencil/core';
export class WrappedButtons {
constructor() {
this.styleclass = undefined;
this.primarybuttontext = undefined;
this.primarybuttonhref = undefined;
this.primarybuttonclass = 'btn-primary';
this.secondarybuttontext = undefined;
this.secondarybuttonhref = undefined;
this.secondarybuttonclass = "btn-secondary";
}
render() {
return (h("div", { class: this.styleclass ? `${this.styleclass} button-wrap` : 'button-wrap' }, h("a", { href: this.primarybuttonhref, class: `${this.primarybuttonclass} btn btn-sm` }, this.primarybuttontext), " ", this.secondarybuttontext ? h("a", { href: this.secondarybuttonhref, class: `${this.secondarybuttonclass} btn btn-sm` }, this.secondarybuttontext) : ""));
}
static get is() { return "cla-wrapped-buttons"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["cla-wrapped-buttons.scss"]
};
}
static get styleUrls() {
return {
"$": ["cla-wrapped-buttons.css"]
};
}
static get properties() {
return {
"styleclass": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Button wrapper styling"
},
"attribute": "styleclass",
"reflect": false
},
"primarybuttontext": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Left/Primary button text"
},
"attribute": "primarybuttontext",
"reflect": false
},
"primarybuttonhref": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Left/Primary button href - links to page"
},
"attribute": "primarybuttonhref",
"reflect": false
},
"primarybuttonclass": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Left/Primary button styling class - use bootstrap btn classes to style the button"
},
"attribute": "primarybuttonclass",
"reflect": false,
"defaultValue": "'btn-primary'"
},
"secondarybuttontext": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Right/Secondary button text"
},
"attribute": "secondarybuttontext",
"reflect": false
},
"secondarybuttonhref": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Right/Secondary button href - links to page"
},
"attribute": "secondarybuttonhref",
"reflect": false
},
"secondarybuttonclass": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Right/Secondary button styling class - use bootstrap btn classes to style the button"
},
"attribute": "secondarybuttonclass",
"reflect": false,
"defaultValue": "\"btn-secondary\""
}
};
}
}