Crete a theme for Button for "warning"

crete a theme for Button for “warning”

themeNames=“primary warning”

using LUMO theme

Hi,

Vaadin will add Warning theme variant for Button in the 24.5 (see doc). After we upgrade to this version, it will appear in Jmix. Until then, you can simply add the following into your theme:

vaadin-button[theme~="warning"] {
    color: var(--lumo-warning-text-color);
}

vaadin-button[theme~="warning"][theme~='primary'] {
    background-color: var(--lumo-warning-color);
    color: var(--lumo-warning-contrast-color);
}

Regards,
Gleb

1 Like

thanks for the suggestion
:slight_smile: