feat(dees-pdf-viewer): add configurable sidebar position support
This commit is contained in:
@@ -34,6 +34,9 @@ export class DeesPdfViewer extends DeesElement {
|
||||
@property({ type: Boolean })
|
||||
accessor showSidebar: boolean = false;
|
||||
|
||||
@property({ type: String })
|
||||
accessor sidebarPosition: 'left' | 'right' = 'left';
|
||||
|
||||
@property({ type: Number })
|
||||
accessor currentPage: number = 1;
|
||||
|
||||
@@ -89,7 +92,7 @@ export class DeesPdfViewer extends DeesElement {
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
<dees-tile class="${this.showSidebar ? 'with-sidebar' : ''}">
|
||||
<dees-tile class="${this.showSidebar ? 'with-sidebar' : ''} sidebar-${this.sidebarPosition}">
|
||||
${this.showToolbar ? html`
|
||||
<div slot="header" class="toolbar">
|
||||
<div class="toolbar-group">
|
||||
@@ -251,7 +254,7 @@ export class DeesPdfViewer extends DeesElement {
|
||||
<span class="pdf-footer-item">${this.formatFileSize(this.pdfFileSize)}</span>
|
||||
` : ''}
|
||||
</div>
|
||||
<div class="pdf-footer-center" style="margin-left: ${this.showSidebar ? '100px' : '0'}">
|
||||
<div class="pdf-footer-center" style="margin-left: ${this.showSidebar && this.sidebarPosition === 'left' ? '100px' : this.showSidebar && this.sidebarPosition === 'right' ? '-100px' : '0'}">
|
||||
<span>Page ${this.currentPage} of ${this.totalPages}</span>
|
||||
</div>
|
||||
<div class="pdf-footer-right">
|
||||
|
||||
Reference in New Issue
Block a user