Add new button style variant

Could you please advice how to add new button style variant? For example, I want “warning” variant for the buttons with warning color …

button.addThemeVariants(ButtonVariant.DANGER);

I meant to prepare custom variant, with my personal style …