Skip to content

Commit

Permalink
feat: use EnhancedTabs in MultiSourceCodeViewer
Browse files Browse the repository at this point in the history
  • Loading branch information
javier-godoy committed Jul 2, 2024
1 parent 18c97dd commit 3dba921
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<dependency>
<groupId>com.flowingcode.vaadin.addons</groupId>
<artifactId>enhanced-tabs-addon</artifactId>
<version>1.1.0</version>
<version>1.2.0-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.flowingcode.vaadin.addons.demo;

import com.flowingcode.vaadin.addons.enhancedtabs.EnhancedTabs;
import com.vaadin.flow.component.ComponentUtil;
import com.vaadin.flow.component.html.Div;
import com.vaadin.flow.component.tabs.Tab;
import com.vaadin.flow.component.tabs.Tabs;
import elemental.json.JsonValue;
import java.util.List;
import java.util.Map;
Expand All @@ -17,11 +17,11 @@ public class MultiSourceCodeViewer extends Div {

private SourceCodeViewer codeViewer;
private Tab selectedTab;
private Tabs tabs;
private EnhancedTabs tabs;

public MultiSourceCodeViewer(List<SourceCodeTab> sourceCodeTabs, Map<String, String> properties) {
if (sourceCodeTabs.size() > 1) {
tabs = new Tabs(createTabs(sourceCodeTabs));
tabs = new EnhancedTabs(createTabs(sourceCodeTabs));
tabs.addSelectedChangeListener(ev -> onTabSelected(ev.getSelectedTab()));
add(tabs);
selectedTab = tabs.getSelectedTab();
Expand Down

0 comments on commit 3dba921

Please sign in to comment.