I needed to switch a button’s icon to the right side of the text (default is left). In order to achieve this I tried to switch the DOM elements of the button-text and icon, which was unsuccessful.
After some fiddling around with the classes, I finally found a solution to this:
I changed the classes of the button and the icon (using an in-line snippet) to be “ui-button-text-icon-secondary” instead of “…-primary” (button element itself) and ui-button-icon-secondary (icon element).
I hope that someone who needs to achieve this, finds this helpful.