Skip to content

Commit a0ade8e

Browse files
authored
Merge branch 'master' into SIvanova/change-filtering-icon
2 parents 4ac7085 + 5246730 commit a0ade8e

File tree

3 files changed

+56
-11
lines changed

3 files changed

+56
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ The following example shows how you can use the Indigo theme:
5050

5151

5252
### New Features
53+
- `igxButton` directive
54+
- Added styles to support extended fab buttons.
5355
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
5456
- Introduced `showSummaryOnCollapse` grid property which allows you to control whether the summary row stays visible when the groupBy / parent row is collapsed.
5557
- Added support for tooltips on data cells default template and summary cells.

projects/igniteui-angular/src/lib/core/styles/components/button/_button-theme.scss

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,8 @@
429429
@mixin igx-button($theme) {
430430
@include igx-root-css-vars($theme);
431431

432+
$left: if-ltr(left, right);
433+
$right: if-ltr(right, left);
432434
$button-border: 1px solid transparent;
433435
$button-width: rem(88px);
434436

@@ -514,15 +516,15 @@
514516

515517

516518
$button-floating-padding: (
517-
comfortable: rem(15px),
518-
cosy: rem(11px),
519-
compact: rem(7px)
519+
comfortable: rem(8px) rem(16px),
520+
cosy: rem(4px) rem(12px),
521+
compact: 0 rem(8px)
520522
);
521523

522524
$button-floating-size: (
523-
comfortable: rem(56px),
524-
cosy: rem(48px),
525-
compact: rem(40px)
525+
comfortable: rem(48px),
526+
cosy: rem(40px),
527+
compact: rem(32px)
526528
);
527529

528530
$icon-in-button-size: rem(18px);
@@ -762,18 +764,37 @@
762764
background: --var($theme, 'fab-focus-background');
763765
box-shadow: $fab-shadow--focus;
764766
}
767+
768+
igx-icon {
769+
display: inline-flex;
770+
order: -1;
771+
margin: rem(8px) 0;
772+
}
773+
774+
* + igx-icon {
775+
margin: 0;
776+
margin-#{$right}: rem(12px);
777+
}
765778
}
766779

767780
%igx-button--fab-cosy {
768781
padding: map-get($button-floating-padding, 'cosy');
769782
min-width: map-get($button-floating-size, 'cosy');
770783
min-height: map-get($button-floating-size, 'cosy');
784+
785+
* + igx-icon {
786+
margin-#{$right}: rem(8px);
787+
}
771788
}
772789

773790
%igx-button--fab-compact {
774791
padding: map-get($button-floating-padding, 'compact');
775792
min-width: map-get($button-floating-size, 'compact');
776793
min-height: map-get($button-floating-size, 'compact');
794+
795+
* + igx-icon {
796+
margin-#{$right}: rem(4px);
797+
}
777798
}
778799

779800
%igx-button--icon {
@@ -849,4 +870,15 @@
849870
text-align: center;
850871
}
851872
}
873+
874+
%igx-button--fab {
875+
p,
876+
span,
877+
div {
878+
@include igx-type-style($type-scale, $text) {
879+
text-align: center;
880+
margin: 0;
881+
}
882+
}
883+
}
852884
}

src/app/button/button.sample.html

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h4 class="sample-title">Flat Buttons</h4>
2424
</div>
2525
</div>
2626
</article>
27-
27+
2828
<article class="sample-column">
2929
<h4 class="sample-title">Raised Buttons</h4>
3030
<div class="buttons-sample">
@@ -48,7 +48,7 @@ <h4 class="sample-title">Raised Buttons</h4>
4848
</div>
4949
</div>
5050
</article>
51-
51+
5252
<article class="sample-column">
5353
<h4 class="sample-title">Outlined Buttons</h4>
5454
<div class="buttons-sample">
@@ -72,7 +72,7 @@ <h4 class="sample-title">Outlined Buttons</h4>
7272
</div>
7373
</div>
7474
</article>
75-
75+
7676
<article class="sample-column">
7777
<h4 class="sample-title">Floating Action Buttons</h4>
7878
<div class="buttons-sample">
@@ -108,7 +108,7 @@ <h4 class="sample-title">Floating Action Buttons</h4>
108108
</div>
109109
</div>
110110
</article>
111-
111+
112112
<article class="sample-column">
113113
<h4 class="sample-title">Icon Buttons</h4>
114114
<div class="buttons-sample">
@@ -179,7 +179,18 @@ <h4 class="sample-title">Buttons based on Display Density</h4>
179179
</div>
180180
<div class="button-sample">
181181
<button igxRipple igxButton="fab" [displayDensity]="density">
182-
<igx-icon fontSet="material" >favorite</igx-icon>
182+
<igx-icon fontSet="material">favorite</igx-icon>
183+
</button>
184+
</div>
185+
<div class="button-sample">
186+
<button igxRipple igxButton="fab" [displayDensity]="density">
187+
<span>Favorite</span>
188+
<igx-icon fontSet="material">favorite</igx-icon>
189+
</button>
190+
</div>
191+
<div class="button-sample">
192+
<button igxRipple igxButton="fab" [displayDensity]="density">
193+
<span>Favorite</span>
183194
</button>
184195
</div>
185196
</div>

0 commit comments

Comments
 (0)