Implemented a style change event handler by parsing the button name and matching it to a CSS className