automatically add waves effect to buttons
This commit is contained in:
parent
65e8b9686b
commit
0eae6e0368
2 changed files with 21 additions and 3 deletions
|
@ -78,6 +78,25 @@ class windowman {
|
|||
|
||||
/* Fill in data and events. */
|
||||
function appearance() {
|
||||
// Add missing classes to all elements.
|
||||
function elements() {
|
||||
// Add buttons elements.
|
||||
function buttons() {
|
||||
document.querySelectorAll(`button`).forEach((button) => {
|
||||
if (!button.classList.contains(`btn`)) {
|
||||
button.classList.add(`btn`);
|
||||
}
|
||||
if (!button.classList.contains(`waves-effect`)) {
|
||||
button.classList.add(`waves-effect`);
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
buttons();
|
||||
}
|
||||
|
||||
|
||||
function icons() {
|
||||
let target_elements = document.querySelectorAll(`[data-icon]`);
|
||||
|
||||
|
@ -204,6 +223,7 @@ class windowman {
|
|||
});
|
||||
}
|
||||
|
||||
elements();
|
||||
text();
|
||||
icons();
|
||||
storage();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue