Skip to content

Commit

Permalink
bugfix(stepper): Conditional margin for stepper templates (#135)
Browse files Browse the repository at this point in the history
* add step classes if div has children or text

* update(step-body): simplify styles
  • Loading branch information
emoralesb05 authored and kyleledbetter committed Nov 4, 2016
1 parent 7489d21 commit 6db4a6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/platform/core/steps/step-body/step-body.component.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<div layout="row" flex>
<ng-content></ng-content>
<div flex>
<div [tdToggle]="!active">
<div class="td-step-content">
<div class="td-step-content-wrapper" [tdToggle]="!active">
<div #contentRef [class.td-step-content]="contentRef.children.length || contentRef.textContent.trim()">
<ng-content select="[td-step-body-content]"></ng-content>
</div>
<div layout="row" class="td-step-actions">
<div #actionsRef layout="row" [class.td-step-actions]="actionsRef.children.length || actionsRef.textContent.trim()">
<ng-content select="[td-step-body-actions]"></ng-content>
</div>
</div>
<div [tdToggle]="active || !isComplete()" class="td-step-summary">
<div #summaryRef [tdToggle]="active || !isComplete()" [class.td-step-summary]="summaryRef.children.length || summaryRef.textContent.trim()">
<ng-content select="[td-step-body-summary]"></ng-content>
</div>
</div>
Expand Down
10 changes: 1 addition & 9 deletions src/platform/core/steps/step-body/step-body.component.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
@import '../../styles/variables';
@import '../../styles/default-theme';

.td-step-content,
.td-step-summary,
.td-step-actions {
padding-top: $padding;
padding-left: $padding;
display: block;
margin: $margin;
}

.td-step-summary,
.td-step-actions {
margin-bottom: $margin;
}

0 comments on commit 6db4a6a

Please sign in to comment.