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 #135

Merged
merged 1 commit 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/listui.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export default class ListUI extends Plugin {
buttonView.set( {
label,
icon,
tooltip: true
tooltip: true,
isToggleable: true
} );

// Bind button model to command.
Expand Down
3 changes: 3 additions & 0 deletions tests/listui.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ describe( 'ListUI', () => {

it( 'should set up buttons for bulleted list and numbered list', () => {
expect( bulletedListButton ).to.be.instanceOf( ButtonView );
expect( bulletedListButton.isToggleable ).to.be.true;

expect( numberedListButton ).to.be.instanceOf( ButtonView );
expect( numberedListButton.isToggleable ).to.be.true;
} );

it( 'should execute proper commands when buttons are used', () => {
Expand Down