Skip to content

Commit

Permalink
feat(keep-pwa): product pgae
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm authored and AliMD committed Jun 14, 2023
1 parent 884e28e commit 82fe29d
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions uniquely/keep-pwa/src/ui/page/product.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import {
customElement,
css,
html,
LocalizeMixin,
SignalMixin,
AlwatrBaseElement,
UnresolvedMixin,
} from '@alwatr/element';

import {languageButtonClickEventListener, topAppBarContextProvider} from '../../manager/context.js';
import '../stuff/select-product.js';


declare global {
interface HTMLElementTagNameMap {
'alwatr-page-product': AlwatrPageProduct;
}
}

/**
* Alwatr Select Product Page
*/
@customElement('alwatr-page-product')
export class AlwatrPageProduct extends UnresolvedMixin(LocalizeMixin(SignalMixin(AlwatrBaseElement))) {
static override styles = css`
:host {
display: block;
padding: calc(2 * var(--sys-spacing-track));
box-sizing: border-box;
min-height: 100%;
}
`;

override connectedCallback(): void {
super.connectedCallback();
topAppBarContextProvider.setValue({
type: 'small',
headlineKey: 'page_product_headline',
startIcon: {icon: 'arrow-back-outline', flipRtl: true, clickSignalId: 'back_to_home_click_event'},
endIconList: [{icon: 'globe-outline', clickSignalId: languageButtonClickEventListener.id}],
tinted: 2,
});
}

override render(): unknown {
this._logger.logMethod?.('render');

return html`<alwatr-select-product></alwatr-select-product>`;
}
}

0 comments on commit 82fe29d

Please sign in to comment.