getButtonType(button, buttonNames) {
    return button.className.match(RegExp(`(${buttonNames.join('|')})`))[0];
  }
Get button type
@param {HTMLElement} button - event target element
@param {array} buttonNames - Array of button names
@returns {string} - button type