Closed mas4ivv closed 5 years ago
The result of the followings isn't the same.
button.addThemeVariants(ButtonVariant.LUMO_SUCCESS);
button.setIcon(new Icon(VaadinIcon.ARROW_RIGHT));
button.setIcon(new Icon(VaadinIcon.ARROW_RIGHT));
button.addThemeVariants(ButtonVariant.LUMO_SUCCESS);
For a button with an icon only,
updateThemeAttribute
sets the theme to 'icon'. When I change the icon, the theme is removed. This is quite obvious when looking at the code:Currently I'm subclassing Button and use this code instead: