Skip to content

Commit

Permalink
Merge pull request #933 from SanjanaSogimatt/modify-toolbar
Browse files Browse the repository at this point in the history
Modifying toolbar title
  • Loading branch information
birm authored Apr 1, 2024
2 parents 98cf624 + 29ef9bc commit 3d6f9b7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
2 changes: 1 addition & 1 deletion components/toolbar/toolbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ ul.drop_down {
}

ul.tools > li:hover ul.drop_down {
flex-direction: column;
flex-direction: row; /* Consumes less space */
display: flex;
width: fit-content;
width: -moz-fit-content;
Expand Down
32 changes: 13 additions & 19 deletions components/toolbar/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,11 @@ CaToolbar.prototype.__createBtn = function(options) {
btn.classList.add('md-24');
btn.textContent = options.icon;
if (options.title) {
btn.title = options.title;
tippy(btn, {
content: options.title,
placement: 'right',
delay: 300,
theme: 'light-border',
placement: 'bottom',
delay: 200,
theme: 'dark',
});
}
li.appendChild(btn);
Expand Down Expand Up @@ -214,12 +213,11 @@ CaToolbar.prototype.__createCheck = function(options) {
icon.textContent = options.icon;
icon.htmlFor = id;
if (options.title) {
icon.title = options.title;
tippy(icon, {
content: options.title,
placement: 'right',
placement: 'bottom',
delay: 300,
theme: 'light-border',
theme: 'dark',
});
}
li.appendChild(icon);
Expand Down Expand Up @@ -291,12 +289,11 @@ CaToolbar.prototype.__createRadio = function(options) {

icon.htmlFor = id;
if (options.title) {
icon.title = options.title;
tippy(icon, {
content: options.title,
placement: 'right',
placement: 'bottom',
delay: 300,
theme: 'light-border',
theme: 'dark',
});
}

Expand Down Expand Up @@ -337,12 +334,11 @@ CaToolbar.prototype.__createMultiStateBtns = function(options) {
icon.dataset.state = 0;
icon.textContent = options.icon;
if (options.title) {
icon.title = options.title;
tippy(icon, {
content: options.title,
placement: 'right',
placement: 'bottom',
delay: 300,
theme: 'light-border',
theme: 'dark',
});
}
li.appendChild(icon);
Expand Down Expand Up @@ -390,12 +386,11 @@ CaToolbar.prototype.__createMultiDropDown = function(options) {
icon.textContent = options.icon;
icon.htmlFor = id;
if (options.title) {
icon.title = options.title;
tippy(icon, {
content: options.title,
placement: 'right',
placement: 'bottom',
delay: 300,
theme: 'light-border',
theme: 'dark',
});
}
li.appendChild(icon);
Expand Down Expand Up @@ -518,12 +513,11 @@ CaToolbar.prototype.__createDropDown = function(options) {
icon.textContent = options.icon;
icon.htmlFor = id;
if (options.title) {
icon.title = options.title;
tippy(icon, {
content: options.title,
placement: 'right',
placement: 'left-start',
delay: 300,
theme: 'light-border',
theme: 'dark',
});
}
li.appendChild(icon);
Expand Down

0 comments on commit 3d6f9b7

Please sign in to comment.