Skip to content

Commit 4f1b522

Browse files
committed
Replace VaadinIcon with IconFactory
1 parent 98ed15a commit 4f1b522

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main/java/com/flowingcode/addons/applayout/MenuItem.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import com.vaadin.flow.component.Tag;
2727
import com.vaadin.flow.component.dependency.JsModule;
2828
import com.vaadin.flow.component.dependency.NpmPackage;
29-
import com.vaadin.flow.component.icon.VaadinIcon;
29+
import com.vaadin.flow.component.icon.IconFactory;
3030
import com.vaadin.flow.server.Command;
3131

3232
/**
@@ -56,8 +56,8 @@ public MenuItem(String label, Command command) {
5656
this.setCommand(command);
5757
}
5858

59-
/** Create a new instance of {@code MenuItem} with a label, a {@code VaadinIcon}, and left-button command. */
60-
public MenuItem(String label, VaadinIcon icon, Command command) {
59+
/** Create a new instance of {@code MenuItem} with a label, an {@code IconFactory}, and left-button command. */
60+
public MenuItem(String label, IconFactory icon, Command command) {
6161
this(label, command);
6262
setIcon(icon.create().getElement().getAttribute("icon"));
6363
}

src/main/java/com/flowingcode/addons/applayout/ToolbarIconButton.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import com.vaadin.flow.component.Tag;
2525
import com.vaadin.flow.component.dependency.JsModule;
2626
import com.vaadin.flow.component.dependency.NpmPackage;
27-
import com.vaadin.flow.component.icon.VaadinIcon;
27+
import com.vaadin.flow.component.icon.IconFactory;
2828
import com.vaadin.flow.server.Command;
2929

3030
/**
@@ -53,8 +53,8 @@ public ToolbarIconButton(String title, Command command) {
5353
this.setCommand(command);
5454
}
5555

56-
/** Create a new instance of {@code MenuItem} with a title, a {@code VaadinIcon}, and left-button command. */
57-
public ToolbarIconButton(String title, VaadinIcon icon, Command command) {
56+
/** Create a new instance of {@code MenuItem} with a title, an {@code IconFactory}, and left-button command. */
57+
public ToolbarIconButton(String title, IconFactory icon, Command command) {
5858
this(title, command);
5959
setIcon(icon.create().getElement().getAttribute("icon"));
6060
}

0 commit comments

Comments
 (0)