Update workbench customizer web part to support full-width
This commit is contained in:
parent
e0fa5f1b25
commit
ebdc458c83
File diff suppressed because it is too large
Load Diff
|
@ -23,6 +23,7 @@
|
|||
"properties": {
|
||||
"requiresPageRefresh": false,
|
||||
"customWorkbenchStyles": true,
|
||||
"customWorkbenchStylesFullWidth": false,
|
||||
"previewMode": true
|
||||
}
|
||||
}]
|
||||
|
|
|
@ -8,6 +8,7 @@ import * as strings from 'WorkbenchCustomizerWebPartStrings';
|
|||
export interface IWorkbenchCustomizerWebPartProps {
|
||||
requiresPageRefresh: boolean;
|
||||
customWorkbenchStyles: boolean;
|
||||
customWorkbenchStylesFullWidth: boolean;
|
||||
previewMode: boolean;
|
||||
}
|
||||
|
||||
|
@ -26,6 +27,10 @@ export default class WorkbenchCustomizerWebPart extends BaseClientSideWebPart<IW
|
|||
await import('./styles/customWorkbenchStyles.module.scss');
|
||||
}
|
||||
|
||||
if (this.properties.customWorkbenchStyles && this.properties.customWorkbenchStylesFullWidth) {
|
||||
await import('./styles/customWorkbenchStylesFullWidth.module.scss');
|
||||
}
|
||||
|
||||
if (this.properties.previewMode) {
|
||||
const previewBtn = document.getElementsByName("Preview")[0];
|
||||
previewBtn.click();
|
||||
|
@ -68,6 +73,10 @@ export default class WorkbenchCustomizerWebPart extends BaseClientSideWebPart<IW
|
|||
PropertyPaneToggle('customWorkbenchStyles', {
|
||||
label: strings.CustomWorkbenchStylesFieldLabel
|
||||
}),
|
||||
PropertyPaneToggle('customWorkbenchStylesFullWidth', {
|
||||
label: strings.customWorkbenchStylesFullWidthFieldLabel,
|
||||
disabled: !this.properties.customWorkbenchStyles
|
||||
}),
|
||||
PropertyPaneToggle('previewMode', {
|
||||
label: strings.PreviewModeFieldLabel
|
||||
})
|
||||
|
|
|
@ -3,6 +3,7 @@ define([], function() {
|
|||
"PropertyPaneDescription": "Description",
|
||||
"BasicGroupName": "Configuration",
|
||||
"CustomWorkbenchStylesFieldLabel": "Enable custom styles for Workbench",
|
||||
"customWorkbenchStylesFullWidthFieldLabel": "Enable custom styles for full-width",
|
||||
"PreviewModeFieldLabel": "Enable Preview mode by default",
|
||||
}
|
||||
});
|
||||
|
|
|
@ -2,6 +2,7 @@ declare interface IWorkbenchCustomizerWebPartStrings {
|
|||
PropertyPaneDescription: string;
|
||||
BasicGroupName: string;
|
||||
CustomWorkbenchStylesFieldLabel: string;
|
||||
customWorkbenchStylesFullWidthFieldLabel: string;
|
||||
PreviewModeFieldLabel: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
:global #workbenchPageContent {
|
||||
// max-width: 1316px;
|
||||
max-width: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
:global #workbenchPageContent {
|
||||
& > div {
|
||||
& > div {
|
||||
& > div {
|
||||
.CanvasComponent {
|
||||
.CanvasZone {
|
||||
max-width: 100%;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
|
||||
.CanvasSection {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
|
||||
.ControlZone {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue