Support multiple classes for themeButtons

This commit is contained in:
Francisco Hodge 2018-06-29 20:41:14 -04:00
parent 0581247fbe
commit e138f1fd6f

View File

@ -123,7 +123,13 @@ class SimpleKeyboard {
if(Array.isArray(themeButtons)){
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 {