org.dominokit.domino.ui.spin.SpinItem Maven / Gradle / Ivy
package org.dominokit.domino.ui.spin;
import elemental2.dom.HTMLDivElement;
import elemental2.dom.HTMLElement;
import elemental2.dom.Node;
import org.dominokit.domino.ui.utils.BaseDominoElement;
import org.dominokit.domino.ui.utils.DominoElement;
import org.jboss.elemento.IsElement;
import static org.jboss.elemento.Elements.div;
public class SpinItem extends BaseDominoElement> {
private T value;
private DominoElement element = DominoElement.of(div().css(SpinStyles.spin_item));
public SpinItem(T value) {
this.value = value;
init(this);
}
public SpinItem(T value, Node content) {
this(value);
setContent(content);
}
public SpinItem(T value, IsElement> content) {
this(value);
setContent(content);
}
public static SpinItem create(T value) {
return new SpinItem<>(value);
}
public static SpinItem create(T value, Node content) {
return new SpinItem<>(value, content);
}
public static SpinItem create(T value, IsElement> content) {
return new SpinItem<>(value, content);
}
public T getValue() {
return value;
}
@Override
public HTMLDivElement element() {
return element.element();
}
}