Skip to content

Commit 49e7117

Browse files
Merge pull request #48 from PRGfx/bugfix/active-state
BUGFIX: highlight toolbar button when active
2 parents 8d860c1 + 0a4d06e commit 49e7117

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Resources/Private/UiPlugin/src/ButtonComponent.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default function (commandName) {
1212
static propTypes = {
1313
i18nRegistry: PropTypes.object,
1414
tooltip: PropTypes.string,
15+
isActive: PropTypes.boolean,
1516
};
1617
handleClick = () => {
1718
// this command name must match the identifier of the command from examplePlugin.js, this.editor.commands.add(...)
@@ -22,6 +23,7 @@ export default function (commandName) {
2223
onClick: this.handleClick,
2324
title: this.props.i18nRegistry.translate(this.props.tooltip),
2425
icon: this.props.icon,
26+
isActive: this.props.isActive,
2527
};
2628
return <IconButton {...props} />;
2729
}

Resources/Public/UiPlugin/Plugin.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Resources/Public/UiPlugin/Plugin.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)