Skip to content

Commit

Permalink
Fix base case for spacer
Browse files Browse the repository at this point in the history
  • Loading branch information
kball committed Jun 22, 2016
1 parent 74cf2ca commit c17a914
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/componentFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,12 @@ module.exports = function(element) {
// <spacer>
case this.components.spacer:
var classes = ['spacer'];
var size = 16;
var size;
var html = '';
if (element.attr('class')) {
classes = classes.concat(element.attr('class').split(' '));
}
if (element.attr('size')) {
size = (element.attr('size'));
html += '<table class="%s"><tbody><tr><td height="'+size+'px" style="font-size:'+size+'px;line-height:'+size+'px;">&#xA0;</td></tr></tbody></table>';
} else {
if (element.attr('size-sm') || element.attr('size-lg')) {
if (element.attr('size-sm')) {
size = (element.attr('size-sm'));
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>';
Expand All @@ -140,6 +137,9 @@ module.exports = function(element) {
size = (element.attr('size-lg'));
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>';
}
} else {
size = (element.attr('size')) || 16;
html += '<table class="%s"><tbody><tr><td height="'+size+'px" style="font-size:'+size+'px;line-height:'+size+'px;">&#xA0;</td></tr></tbody></table>';
}

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

0 comments on commit c17a914

Please sign in to comment.