From e138f1fd6f5fcbb07682636c7b9d9a1a02e720a8 Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Fri, 29 Jun 2018 20:41:14 -0400 Subject: [PATCH] Support multiple classes for themeButtons --- src/lib/components/Keyboard.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/components/Keyboard.js b/src/lib/components/Keyboard.js index 8a0e172d..39323e33 100644 --- a/src/lib/components/Keyboard.js +++ b/src/lib/components/Keyboard.js @@ -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 {