@@ -43,74 +43,74 @@ export default class CardBuilder {
43
43
return result ;
44
44
}
45
45
46
- public title ( _title = "My Tech Stack" ) : CardBuilder {
46
+ public title ( _title = "My Tech Stack" ) {
47
47
this . card . setTitle ( title . parse ( _title ) ) ;
48
48
return this ;
49
49
}
50
50
51
- public lineCount ( _lineCount = "1" ) : CardBuilder {
51
+ public lineCount ( _lineCount = "1" ) {
52
52
this . card . setLineCount ( lineCount . parse ( Number ( _lineCount ) ) ) ;
53
53
return this ;
54
54
}
55
55
56
- public align ( _align = "left" ) : CardBuilder {
56
+ public align ( _align = "left" ) {
57
57
this . card . setBadgeAlign ( align . parse ( _align ) ) ;
58
58
return this ;
59
59
}
60
60
61
- public titleAlign ( _titleAlign = "left" ) : CardBuilder {
61
+ public titleAlign ( _titleAlign = "left" ) {
62
62
this . card . setTitleAlign ( align . parse ( _titleAlign ) ) ;
63
63
return this ;
64
64
}
65
65
66
- public border ( _showBorder = "true" ) : CardBuilder {
66
+ public border ( _showBorder = "true" ) {
67
67
this . card . setShowBorder (
68
68
showBorder . parse ( _showBorder === "false" ? false : true )
69
69
) ;
70
70
return this ;
71
71
}
72
72
73
- public hideTitle ( _hideTitle = "false" ) : CardBuilder {
73
+ public hideTitle ( _hideTitle = "false" ) {
74
74
this . card . setHideTitle ( _hideTitle === "true" ) ;
75
75
return this ;
76
76
}
77
77
78
- public borderRadius ( _borderRadius = "4.5" ) : CardBuilder {
78
+ public borderRadius ( _borderRadius = "4.5" ) {
79
79
this . card . setBorderRadius ( borderRadius . parse ( Number ( _borderRadius ) ) ) ;
80
80
return this ;
81
81
}
82
82
83
- public fontWeight ( _fontWeight = "semibold" ) : CardBuilder {
83
+ public fontWeight ( _fontWeight = "semibold" ) {
84
84
this . card . setFontWeight ( fontWeight . parse ( _fontWeight ) ) ;
85
85
return this ;
86
86
}
87
87
88
- public fontSize ( _fontSize = "18" ) : CardBuilder {
88
+ public fontSize ( _fontSize = "18" ) {
89
89
this . card . setFontSize ( fontSize . parse ( Number ( _fontSize ) ) ) ;
90
90
return this ;
91
91
}
92
92
93
- public theme ( _theme = "github" ) : CardBuilder {
93
+ public theme ( _theme = "github_dark" ) {
94
94
this . card . setTheme ( getThemeByName ( _theme ) ) ;
95
95
return this ;
96
96
}
97
97
98
- public family ( _fontFamily = "Segoe UI" ) : CardBuilder {
98
+ public family ( _fontFamily = "Segoe UI" ) {
99
99
this . card . setFontFamily ( fontFamily . parse ( _fontFamily ) ) ;
100
100
return this ;
101
101
}
102
102
103
- public gap ( _gap = "10" ) : CardBuilder {
103
+ public gap ( _gap = "10" ) {
104
104
this . card . setGap ( gap . parse ( Number ( _gap ) ) ) ;
105
105
return this ;
106
106
}
107
107
108
- public lineHeight ( _lh = "7" ) : CardBuilder {
108
+ public lineHeight ( _lh = "7" ) {
109
109
this . card . setLineHeight ( lineHeight . parse ( Number ( _lh ) ) ) ;
110
110
return this ;
111
111
}
112
112
113
- public bgColor ( bgColor = "" ) : CardBuilder {
113
+ public bgColor ( bgColor = "" ) {
114
114
if ( isHexColor ( bgColor ) ) {
115
115
this . card . setTheme ( {
116
116
...this . card . getTheme ( ) ,
@@ -121,7 +121,7 @@ export default class CardBuilder {
121
121
return this ;
122
122
}
123
123
124
- public borderColor ( border = "" ) : CardBuilder {
124
+ public borderColor ( border = "" ) {
125
125
if ( isHexColor ( border ) ) {
126
126
this . card . setTheme ( {
127
127
...this . card . getTheme ( ) ,
@@ -132,7 +132,7 @@ export default class CardBuilder {
132
132
return this ;
133
133
}
134
134
135
- public badgeColor ( badge = "" ) : CardBuilder {
135
+ public badgeColor ( badge = "" ) {
136
136
if ( isHexColor ( badge ) ) {
137
137
this . card . setTheme ( {
138
138
...this . card . getTheme ( ) ,
@@ -143,7 +143,7 @@ export default class CardBuilder {
143
143
return this ;
144
144
}
145
145
146
- public titleColor ( title = "" ) : CardBuilder {
146
+ public titleColor ( title = "" ) {
147
147
if ( isHexColor ( title ) ) {
148
148
this . card . setTheme ( {
149
149
...this . card . getTheme ( ) ,
@@ -154,7 +154,7 @@ export default class CardBuilder {
154
154
return this ;
155
155
}
156
156
157
- public hideBackground ( hb = "false" ) : CardBuilder {
157
+ public hideBackground ( hb = "false" ) {
158
158
if ( hb . toString ( ) === "true" ) {
159
159
this . card . setTheme ( {
160
160
...this . card . getTheme ( ) ,
@@ -165,9 +165,7 @@ export default class CardBuilder {
165
165
return this ;
166
166
}
167
167
168
- public lines (
169
- cb : ( line : number , addBadge : ( b : Badge ) => void ) => void
170
- ) : CardBuilder {
168
+ public lines ( cb : ( line : number , addBadge : ( b : Badge ) => void ) => void ) {
171
169
// for loop from 1 to the line count
172
170
// each iteration calls the callback function
173
171
for ( let i = 1 ; i <= this . card . getLineCount ( ) ; i ++ ) {
0 commit comments