Skip to content
This repository was archived by the owner on Jun 13, 2022. It is now read-only.

Commit 8c0740f

Browse files
feat: add background, color, and class options
Following: atom-community/tool-bar#278 and: atom-community/tool-bar#285 Released with v1.2.1 and v1.2.2 of tool-bar respectively
1 parent 4f6e8c6 commit 8c0740f

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

lib/types/button.js

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ export default function (toolBar, button) {
88
html: button.html,
99
tooltip: button.tooltip,
1010
priority: button.priority || 45,
11+
background: button.background,
12+
color: button.color,
13+
class: button.class,
1114
callback: button.callback,
1215
};
1316

lib/types/file.js

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ export default function (toolBar, button) {
99
tooltip: button.tooltip,
1010
priority: button.priority || 45,
1111
data: button.file,
12+
background: button.background,
13+
color: button.color,
14+
class: button.class,
1215
callback: (file) => {
1316
atom.workspace.open(file);
1417
}

lib/types/function.js

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ export default function (toolBar, button, getActiveItem) {
99
tooltip: button.tooltip,
1010
priority: button.priority || 45,
1111
data: button.callback,
12+
background: button.background,
13+
color: button.color,
14+
class: button.class,
1215
callback(data) {
1316
return data.call(this, getActiveItem().item);
1417
},

lib/types/url.js

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ export default function (toolBar, button) {
1212
tooltip: button.tooltip,
1313
priority: button.priority || 45,
1414
data: button.url,
15+
background: button.background,
16+
color: button.color,
17+
class: button.class,
1518
callback(url) {
1619
const urlReplace = new UrlReplace();
1720
// eslint-disable-next-line no-param-reassign

0 commit comments

Comments
 (0)