Skip to content

Commit 393f9a9

Browse files
javier-godoypaodb
authored andcommitted
refactor(demo): add compatibility label
1 parent 7e6f887 commit 393f9a9

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/AllFeaturesDemo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import com.vaadin.flow.component.grid.Grid;
3535
import com.vaadin.flow.component.grid.Grid.SelectionMode;
3636
import com.vaadin.flow.component.html.Div;
37-
import com.vaadin.flow.component.html.Label;
3837
import com.vaadin.flow.component.icon.VaadinIcon;
3938
import com.vaadin.flow.component.notification.Notification;
4039
import com.vaadin.flow.component.orderedlayout.FlexComponent.JustifyContentMode;
@@ -189,7 +188,8 @@ public AllFeaturesDemo() {
189188
heightByRowsField.setStepButtonsVisible(true);
190189

191190
binder.getFields().map(Component.class::cast).forEach(features::add);
192-
Label label = new Label("Features");
191+
192+
CompatibilityLabel label = new CompatibilityLabel("Features");
193193
label.addClassNames("label");
194194

195195
features.addComponentAtIndex(2, label);
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*-
2+
* #%L
3+
* Grid Helpers Add-on
4+
* %%
5+
* Copyright (C) 2022 - 2025 Flowing Code
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
package com.flowingcode.vaadin.addons.gridhelpers;
21+
22+
import com.vaadin.flow.component.Component;
23+
import com.vaadin.flow.component.HasStyle;
24+
import com.vaadin.flow.component.Tag;
25+
import com.vaadin.flow.component.Text;
26+
27+
@Tag(Tag.LABEL)
28+
public class CompatibilityLabel extends Component implements HasStyle {
29+
30+
public CompatibilityLabel(String text) {
31+
getElement().appendChild(new Text(text).getElement());
32+
}
33+
34+
35+
}

0 commit comments

Comments
 (0)