Skip to content

Commit 371c752

Browse files
feat(demo): add field label examples to labels and icons demo
1 parent 4ef8c06 commit 371c752

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/test/java/com/flowingcode/vaadin/addons/fctogglebutton/FCToggleButtonDemo.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ public FCToggleButtonDemo() {
3939

4040
FCToggleButton basic = new FCToggleButton();
4141

42+
FCToggleButton withLabel = new FCToggleButton("Notifications");
43+
44+
FCToggleButton withLabelAndInitialValue = new FCToggleButton("Dark mode", true)
45+
.setLeftLabel("Off")
46+
.setRightLabel("On");
47+
4248
FCToggleButton withLeftLabel = new FCToggleButton()
4349
.setLeftLabel("Off");
4450

@@ -80,6 +86,8 @@ public FCToggleButtonDemo() {
8086
add(new VerticalLayout(
8187
new H3("Basic"),
8288
basic,
89+
new H3("With field label"),
90+
new HorizontalLayout(withLabel, withLabelAndInitialValue),
8391
new H3("With labels"),
8492
new HorizontalLayout(withLeftLabel, withRightLabel, withBothLabels),
8593
new H3("With icons"),

0 commit comments

Comments
 (0)