Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit 0b9f655

Browse files
tijoforyounshahan
authored andcommitted
Migrate material_expansionpanel package off of deprecated GlyphComponent.
PiperOrigin-RevId: 179433209
1 parent 1bc9005 commit 0b9f655

File tree

3 files changed

+20
-21
lines changed

3 files changed

+20
-21
lines changed

lib/material_expansionpanel/_mixins.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ $_panel: 'div.panel.themeable';
106106
}
107107

108108
@mixin expansionpanel-expand-button-text-color($color) {
109-
::ng-deep #{$_panel} glyph.expand-button {
109+
::ng-deep #{$_panel} material-icon.expand-button {
110110
color: $color;
111111
}
112112
}

lib/material_expansionpanel/material_expansionpanel.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import 'package:intl/intl.dart';
1010
import 'package:angular_components/button_decorator/button_decorator.dart';
1111
import 'package:angular_components/content/deferred_content_aware.dart';
1212
import 'package:angular_components/focus/focus.dart';
13-
import 'package:angular_components/glyph/glyph.dart';
13+
import 'package:angular_components/material_icon/material_icon.dart';
1414
import 'package:angular_components/material_yes_no_buttons/material_yes_no_buttons.dart';
1515
import 'package:angular_components/model/action/async_action.dart';
1616
import 'package:angular_components/utils/browser/dom_service/dom_service.dart';
@@ -103,7 +103,7 @@ import 'package:angular_components/utils/disposer/disposer.dart';
103103
selector: 'material-expansionpanel',
104104
directives: const [
105105
ButtonDirective,
106-
GlyphComponent,
106+
MaterialIconComponent,
107107
MaterialSaveCancelButtonsDirective,
108108
MaterialYesNoButtonsComponent,
109109
NgIf,
@@ -233,8 +233,7 @@ class MaterialExpansionPanel
233233
@Input()
234234
String secondaryText;
235235

236-
/// An optional glyph icon name to replace the expand arrows with a custom
237-
/// icon.
236+
/// An optional icon name to replace the expand arrows with a custom icon.
238237
///
239238
/// If a custom icon is used, then the icon disappears when the panel is
240239
/// expanded. By default, the expand icon is "expand_less."
@@ -367,7 +366,7 @@ class MaterialExpansionPanel
367366

368367
/// Button that expands or collapses the panel.
369368
///
370-
/// It's either the header or the glyph icon in the content if
369+
/// It's either the header or the icon in the content if
371370
/// [hideExpandedHeader] is set to `true`.
372371
ButtonDirective _expandCollapseButton;
373372
@ViewChild('expandCollapseButton', read: ButtonDirective)

lib/material_expansionpanel/material_expansionpanel.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
<ng-content select="[value]"></ng-content>
3131
</div>
3232

33-
<glyph buttonDecorator
34-
*ngIf="shouldShowExpandIcon"
35-
class="expand-button"
36-
[icon]="expandIcon"
37-
[class.expand-more]="shouldFlipExpandIcon"
38-
(trigger)="handleExpandIconClick()">
39-
</glyph>
33+
<material-icon buttonDecorator
34+
*ngIf="shouldShowExpandIcon"
35+
class="expand-button"
36+
[icon]="expandIcon"
37+
[class.expand-more]="shouldFlipExpandIcon"
38+
(trigger)="handleExpandIconClick()">
39+
</material-icon>
4040
</header>
4141

4242
<!-- Expanded section -->
@@ -46,14 +46,14 @@
4646
<div class="content">
4747
<ng-content></ng-content>
4848
</div>
49-
<glyph *ngIf="shouldShowHiddenHeaderExpandIcon"
50-
#expandCollapseButton
51-
[icon]="expandIcon"
52-
class="expand-button"
53-
buttonDecorator
54-
(trigger)="collapse()"
55-
[attr.aria-label]="closePanelMsg">
56-
</glyph>
49+
<material-icon *ngIf="shouldShowHiddenHeaderExpandIcon"
50+
#expandCollapseButton
51+
[icon]="expandIcon"
52+
class="expand-button"
53+
buttonDecorator
54+
(trigger)="collapse()"
55+
[attr.aria-label]="closePanelMsg">
56+
</material-icon>
5757
</div>
5858
<div *ngIf="!showSaveCancel" class="toolbelt">
5959
<ng-content select="[toolbelt]"></ng-content>

0 commit comments

Comments
 (0)