Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Set UI buttons as toggleable #44

Merged
merged 2 commits into from
Aug 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/alignmentui.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ export default class AlignmentUI extends Plugin {
buttonView.set( {
label: this.localizedOptionTitles[ option ],
icon: icons.get( option ),
tooltip: true
tooltip: true,
isToggleable: true
} );

// Bind button model to command.
Expand Down
1 change: 1 addition & 0 deletions tests/alignmentui.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ describe( 'Alignment UI', () => {
expect( button ).to.have.property( 'label', 'Align left' );
expect( button ).to.have.property( 'icon' );
expect( button ).to.have.property( 'tooltip', true );
expect( button ).to.have.property( 'isToggleable', true );
} );

it( 'has isOn bound to command\'s value', () => {
Expand Down