Skip to content

Commit

Permalink
Merge pull request #48 from PRGfx/bugfix/active-state
Browse files Browse the repository at this point in the history
BUGFIX: highlight toolbar button when active
  • Loading branch information
breadlesscode authored Apr 25, 2023
2 parents 8d860c1 + 0a4d06e commit 49e7117
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Resources/Private/UiPlugin/src/ButtonComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default function (commandName) {
static propTypes = {
i18nRegistry: PropTypes.object,
tooltip: PropTypes.string,
isActive: PropTypes.boolean,
};
handleClick = () => {
// this command name must match the identifier of the command from examplePlugin.js, this.editor.commands.add(...)
Expand All @@ -22,6 +23,7 @@ export default function (commandName) {
onClick: this.handleClick,
title: this.props.i18nRegistry.translate(this.props.tooltip),
icon: this.props.icon,
isActive: this.props.isActive,
};
return <IconButton {...props} />;
}
Expand Down
2 changes: 1 addition & 1 deletion Resources/Public/UiPlugin/Plugin.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Resources/Public/UiPlugin/Plugin.js.map

Large diffs are not rendered by default.

0 comments on commit 49e7117

Please sign in to comment.