mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-04-24 05:20:22 +08:00
Support multiple classes for themeButtons
This commit is contained in:
parent
0581247fbe
commit
e138f1fd6f
@ -123,7 +123,13 @@ class SimpleKeyboard {
|
|||||||
|
|
||||||
if(Array.isArray(themeButtons)){
|
if(Array.isArray(themeButtons)){
|
||||||
themeButtons.forEach(themeButton => {
|
themeButtons.forEach(themeButton => {
|
||||||
buttonThemesParsed[themeButton] = themeObj.class;
|
let themeParsed = buttonThemesParsed[themeButton];
|
||||||
|
|
||||||
|
// If the button has already been added
|
||||||
|
if(themeParsed)
|
||||||
|
buttonThemesParsed[themeButton] = `${themeParsed} ${themeObj.class}`;
|
||||||
|
else
|
||||||
|
buttonThemesParsed[themeButton] = themeObj.class;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user