diff options
Diffstat (limited to 'src/client/views/nodes/button/FontIconBox.tsx')
-rw-r--r-- | src/client/views/nodes/button/FontIconBox.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/button/FontIconBox.tsx b/src/client/views/nodes/button/FontIconBox.tsx index 1b27d562a..b72f31ef8 100644 --- a/src/client/views/nodes/button/FontIconBox.tsx +++ b/src/client/views/nodes/button/FontIconBox.tsx @@ -400,7 +400,7 @@ export class FontIconBox extends DocComponent<ButtonProps, FontIconDocument>(Fon @computed get toggleButton() { // Determine the type of toggle button const switchToggle: boolean = BoolCast(this.rootDoc.switchToggle); - + const buttonText: string = StrCast(this.rootDoc.buttonText); // Colors const color = this.props.styleProvider?.(this.rootDoc, this.props, StyleProp.Color); const backgroundColor = this.props.styleProvider?.(this.rootDoc, this.props, StyleProp.BackgroundColor); @@ -414,6 +414,7 @@ export class FontIconBox extends DocComponent<ButtonProps, FontIconDocument>(Fon if (switchToggle) { return ( <div className={`menuButton ${this.type} ${'switch'}`}> + {buttonText ? buttonText : null} <label className="switch"> <input type="checkbox" checked={backgroundColor === Colors.MEDIUM_BLUE} @@ -880,6 +881,7 @@ Scripting.addGlobal(function webSetURL(url: string, checkResult?: boolean) { **/ Scripting.addGlobal(function toggleSchemaPreview(checkResult?: boolean) { const selected = SelectionManager.Views().length ? SelectionManager.Views()[0].rootDoc : undefined; + console.log(selected && selected.title); if (checkResult && selected) { const result: boolean = NumCast(selected.schemaPreviewWidth) > 0; if (result) return Colors.MEDIUM_BLUE; |