This commit is contained in:
2026-01-04 11:29:19 +00:00
parent 1134cba575
commit 61b79aa4dc
6 changed files with 119 additions and 10 deletions

View File

@@ -19,13 +19,15 @@ export class WccFrame extends DeesElement {
@property({ type: Boolean })
accessor isNative: boolean = false;
@property({ type: Number })
accessor sidebarWidth: number = 200;
public static styles = [
css`
:host {
border: 10px solid #ffaeaf;
position: absolute;
background: ${cssManager.bdTheme('#333', '#000')};
left: 200px;
right: 0px;
top: 0px;
overflow-y: auto;
@@ -55,7 +57,7 @@ export class WccFrame extends DeesElement {
` : `
bottom: ${this.advancedEditorOpen ? '400px' : '100px'};
border: 10px solid #ffaeaf;
left: 200px;
left: ${this.sidebarWidth}px;
`}
transition: all 0.3s ease;
${this.isNative ? 'padding: 0px;' : (() => {
@@ -67,19 +69,19 @@ export class WccFrame extends DeesElement {
case 'tablet':
return `
padding: 0px ${
(document.body.clientWidth - 200 - domtools.breakpoints.tablet) / 2
(document.body.clientWidth - this.sidebarWidth - domtools.breakpoints.tablet) / 2
}px;
`;
case 'phablet':
return `
padding: 0px ${
(document.body.clientWidth - 200 - domtools.breakpoints.phablet) / 2
(document.body.clientWidth - this.sidebarWidth - domtools.breakpoints.phablet) / 2
}px;
`;
case 'phone':
return `
padding: 0px ${
(document.body.clientWidth - 200 - domtools.breakpoints.phone) / 2
(document.body.clientWidth - this.sidebarWidth - domtools.breakpoints.phone) / 2
}px;
`;
}