make danger card header red again

This commit is contained in:
f43nd1r 2018-12-02 23:59:23 +01:00
parent 956ce0859c
commit def881b156
2 changed files with 6 additions and 0 deletions

View file

@ -107,4 +107,9 @@ public class Card extends Composite<Div> implements HasSize, HasStyle {
public boolean isCollapsed() {
return content.getStyle().get("display").equals("none");
}
public void setHeaderColor(String textColor, String backgroundColor) {
header.getStyle().set("color",textColor);
header.getStyle().set("background-color", backgroundColor);
}
}

View file

@ -184,6 +184,7 @@ public class AdminTab extends AppTab<FlexLayout> {
deleteButton.setWidthFull();
Card dangerCard = new Card(configButton, matchingButton, purgeAge, purgeVersion, deleteButton);
dangerCard.setHeader(Translatable.createText(Messages.DANGER_ZONE));
dangerCard.setHeaderColor("var(----lumo-error-text-color)", "var(--lumo-error-color)");
dangerCard.setWidth(500, HasSize.Unit.PIXEL);
getContent().add(dangerCard);
getContent().expand(dangerCard);