Skip to content

Commit 3c0e508

Browse files
committed
Introduce constants
1 parent 416837c commit 3c0e508

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

user-interface/src/main/java/life/qbic/datamanager/views/demo/ComponentDemo.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
public class ComponentDemo extends Div {
4545

4646
public static final String HEADING_2 = "heading-2";
47+
public static final String GAP_04 = "gap-04";
48+
public static final String FLEX_VERTICAL = "flex-vertical";
4749
Div title = new Div("Data Manager - Component Demo");
4850

4951
public ComponentDemo() {
@@ -95,7 +97,7 @@ private static Div fontsShowCase() {
9597
Div header = new Div("Body Font Styles");
9698
header.addClassName(HEADING_2);
9799
container.add(header);
98-
container.addClassNames("flex-vertical", "gap-04");
100+
container.addClassNames(FLEX_VERTICAL, GAP_04);
99101

100102
Arrays.stream(BodyFontStyles.fontStyles).forEach(fontStyle -> {
101103
Div styleHeader = new Div();
@@ -133,7 +135,7 @@ private static Div stepperDialogShowCase(List<Step> steps, String dialogTitle) {
133135

134136
content.add(title);
135137
content.add(showDialog);
136-
content.addClassNames("flex-vertical", "gap-04");
138+
content.addClassNames(FLEX_VERTICAL, GAP_04);
137139

138140
Div confirmBox = new Div("Click the button and press 'Cancel' or 'Save'");
139141
dialog.registerConfirmAction(() -> {
@@ -212,7 +214,7 @@ private static Div dialogShowCase(AppDialog dialog, String dialogType) {
212214
});
213215

214216
content.add(showDialog, confirmBox);
215-
content.addClassNames("flex-vertical", "gap-04");
217+
content.addClassNames(FLEX_VERTICAL, GAP_04);
216218
return content;
217219
}
218220

0 commit comments

Comments
 (0)