Skip to content

Commit c17a914

Browse files
committed
Fix base case for spacer
1 parent 74cf2ca commit c17a914

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lib/componentFactory.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,12 @@ module.exports = function(element) {
123123
// <spacer>
124124
case this.components.spacer:
125125
var classes = ['spacer'];
126-
var size = 16;
126+
var size;
127127
var html = '';
128128
if (element.attr('class')) {
129129
classes = classes.concat(element.attr('class').split(' '));
130130
}
131-
if (element.attr('size')) {
132-
size = (element.attr('size'));
133-
html += '<table class="%s"><tbody><tr><td height="'+size+'px" style="font-size:'+size+'px;line-height:'+size+'px;">&#xA0;</td></tr></tbody></table>';
134-
} else {
131+
if (element.attr('size-sm') || element.attr('size-lg')) {
135132
if (element.attr('size-sm')) {
136133
size = (element.attr('size-sm'));
137134
html += '<table class="%s hide-for-large"><tbody><tr><td height="'+size+'px" style="font-size:'+size+'px;line-height:'+size+'px;">&#xA0;</td></tr></tbody></table>';
@@ -140,6 +137,9 @@ module.exports = function(element) {
140137
size = (element.attr('size-lg'));
141138
html += '<table class="%s show-for-large"><tbody><tr><td height="'+size+'px" style="font-size:'+size+'px;line-height:'+size+'px;">&#xA0;</td></tr></tbody></table>';
142139
}
140+
} else {
141+
size = (element.attr('size')) || 16;
142+
html += '<table class="%s"><tbody><tr><td height="'+size+'px" style="font-size:'+size+'px;line-height:'+size+'px;">&#xA0;</td></tr></tbody></table>';
143143
}
144144

145145
if( element.attr('size-sm') && element.attr('size-lg') ) {

0 commit comments

Comments
 (0)