@malga-checkout-full/core
Version:
Core components for Malga Checkout Full
82 lines (81 loc) • 2.26 kB
JavaScript
import { Component, Host, h, Prop, Event } from '@stencil/core';
export class MalgaCheckoutFullFooter {
constructor() {
this.handleChangeLanguage = (language) => {
this.changeLanguage.emit({ value: language });
};
}
render() {
return (h(Host, { class: { 'malga-checkout-full-footer__container': true } },
h("footer", { class: { 'malga-checkout-full-footer__content': true } },
h("checkout-dropdown", { value: this.language, startIcon: "globe", options: [
{ label: 'Português', value: 'pt' },
{ label: 'English', value: 'en' },
], onChanged: ({ detail: { value } }) => this.handleChangeLanguage(value) }),
!!this.description && this.description)));
}
static get is() { return "malga-checkout-full-footer"; }
static get originalStyleUrls() { return {
"$": ["malga-checkout-full-footer.scss"]
}; }
static get styleUrls() { return {
"$": ["malga-checkout-full-footer.css"]
}; }
static get properties() { return {
"description": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": ""
},
"attribute": "description",
"reflect": false
},
"language": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "language",
"reflect": false
}
}; }
static get events() { return [{
"method": "changeLanguage",
"name": "changeLanguage",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "{ value: Locale }",
"resolved": "{ value: Locale; }",
"references": {
"Locale": {
"location": "import",
"path": "@malga-checkout/i18n/dist/utils"
}
}
}
}]; }
}