Files
chart-app/src/main/java/com/example/components/Fa.java
T
Pit Friedrich 9311d494bd
CI / build-and-test (pull_request) Successful in 1m15s
Fixes #11
- Fix dashboard draggin: introduced sophistaced drag handle
- Fix disappearing of charts when dragged inside a dashboard widget
2026-07-26 14:05:11 +02:00

40 lines
1.2 KiB
Java

package com.example.components;
import com.vaadin.flow.component.icon.FontIcon;
/**
* Font Awesome Free icon references, mirroring the ergonomics of
* {@code VaadinIcon.create()}. Backed by the {@code fa-*} CSS classes
* shipped in the bundled {@code @fortawesome/fontawesome-free} package.
*
* <p>Font Awesome paints glyphs via {@code content: var(--fa)} on
* {@code ::before}; the glyph-specific class (e.g. {@code fa-sun}) is what
* defines that {@code --fa} custom property, so both the family class
* ({@code fa-solid}) and the glyph class must be present.
*/
public enum Fa {
MOON("fa-solid", "fa-moon"),
SUN("fa-solid", "fa-sun"),
DASHBOARD("fa-solid", "fa-gauge-high"),
FORM("fa-solid", "fa-rectangle-list"),
TABLE("fa-solid", "fa-table"),
GLOBE("fa-solid", "fa-globe"),
SEARCH("fa-solid", "fa-magnifying-glass"),
GRID("fa-solid", "fa-table-cells-large"),
ADD("fa-solid", "fa-plus"),
REMOVE("fa-solid", "fa-trash"),
RESET("fa-solid", "fa-arrow-rotate-left"),
DRAG("fa-solid", "fa-grip-vertical");
private final String[] classes;
Fa(String... classes) {
this.classes = classes;
}
public FontIcon create() {
return new FontIcon(classes);
}
}