aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/FontIconBox/FontIconBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-07-18 12:58:01 -0400
committerbobzel <zzzman@gmail.com>2023-07-18 12:58:01 -0400
commitd74a44eb43c97118939359d3f59bc5a57a20953d (patch)
tree1e9b0b0a2fcc68450a76711d23f682a013939c70 /src/client/views/nodes/FontIconBox/FontIconBox.tsx
parentcc36dc14d32ee15727ed6153b019e80586b8285e (diff)
parentb62a751b6a16acd28b4f9a9794ded6ea14fa0de8 (diff)
Merge branch 'master' of https://github.com/brown-dash/Dash-Web
Diffstat (limited to 'src/client/views/nodes/FontIconBox/FontIconBox.tsx')
-rw-r--r--src/client/views/nodes/FontIconBox/FontIconBox.tsx15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/client/views/nodes/FontIconBox/FontIconBox.tsx b/src/client/views/nodes/FontIconBox/FontIconBox.tsx
index 39be4022e..f676641ac 100644
--- a/src/client/views/nodes/FontIconBox/FontIconBox.tsx
+++ b/src/client/views/nodes/FontIconBox/FontIconBox.tsx
@@ -398,18 +398,19 @@ export class FontIconBox extends DocComponent<ButtonProps>() {
button = this.dropdownButton;
break;
case ButtonType.ToggleButton: button = this.toggleButton; break;
- case ButtonType.TextButton:
- const script = ScriptCast(this.rootDoc.script);
+ case ButtonType.ClickButton:
+ case ButtonType.ToolButton:
+ const script = ScriptCast(this.rootDoc.onClick);
const checkResult = script?.script.run({ _readOnly_: true }).result;
- // Script for checking the outcome of the toggle
button = (
- <Button tooltip={tooltip} color={checkResult ?? backgroundColor} icon={this.Icon(color)!} text={StrCast(this.rootDoc.buttonText)} label={this.label}/>
+ <IconButton tooltip={tooltip} onPointerDown={() => script?.script.run({ _readOnly_: false })} color={color} icon={this.Icon(color)!} label={this.label}/>
);
break;
- case ButtonType.ClickButton:
- case ButtonType.ToolButton:
+ case ButtonType.TextButton:
+
+ // Script for checking the outcome of the toggle
button = (
- <IconButton tooltip={tooltip} onPointerDown={() => script?.script.run({ _readOnly_: false })} color={color} icon={this.Icon(color)!} label={this.label}/>
+ <Button tooltip={tooltip} color={checkResult ?? backgroundColor} icon={this.Icon(color)!} text={StrCast(this.rootDoc.buttonText)} label={this.label}/>
);
break;
case ButtonType.MenuButton: button = (