Skip to content

Commit 103ac7c

Browse files
committed
refactor(multiple): switch button selectors
Reworks the various places where we have buttons to use the new selectors.
1 parent 2c7199c commit 103ac7c

File tree

172 files changed

+705
-773
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+705
-773
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<button mat-button>Click here</button>
1+
<button matButton>Click here</button>

src/cdk/schematics/ng-update/html-parsing/angular.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function findInputsOnElementWithTag(html: string, inputName: string, tagN
2323
/** Finds the specified Angular @Input in elements that have one of the specified attributes. */
2424
export function findInputsOnElementWithAttr(html: string, inputName: string, attrs: string[]) {
2525
return [
26-
// Inputs can be also used without brackets (e.g. `<button mat-button color="primary">`)
26+
// Inputs can be also used without brackets (e.g. `<button matButton color="primary">`)
2727
...findAttributeOnElementWithAttrs(html, inputName, attrs),
2828
// Add one column to the mapped offset because the first bracket for the @Input
2929
// is part of the attribute and therefore also part of the offset. We only want to return

src/components-examples/cdk/text-field/text-field-autofill-directive/text-field-autofill-directive-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
<mat-hint>Autofilled!</mat-hint>
1414
}
1515
</mat-form-field>
16-
<button mat-raised-button>Submit</button>
16+
<button matButton="elevated">Submit</button>
1717
</form>

src/components-examples/cdk/text-field/text-field-autofill-monitor/text-field-autofill-monitor-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
<mat-hint>Autofilled!</mat-hint>
1414
}
1515
</mat-form-field>
16-
<button mat-raised-button>Submit</button>
16+
<button matButton="elevated">Submit</button>
1717
</form>

src/components-examples/cdk/tree/cdk-tree-complex/cdk-tree-complex-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
@if (!node.areChildrenLoading() && node.isExpandable()) {
2222
<button
23-
mat-icon-button
23+
matIconButton
2424
cdkTreeNodeToggle
2525
[attr.aria-label]="'Toggle ' + node.raw.name">
2626
<mat-icon class="mat-icon-rtl-mirror">

src/components-examples/cdk/tree/cdk-tree-custom-key-manager/cdk-tree-custom-key-manager-example.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[isDisabled]="!shouldRender(node)"
66
class="example-tree-node">
77
<!-- use a disabled button to provide padding for tree leaf -->
8-
<button mat-icon-button disabled></button>
8+
<button matIconButton disabled></button>
99
{{node.name}}
1010
</cdk-tree-node>
1111
<!-- This is the tree node template for expandable nodes -->
@@ -17,7 +17,7 @@
1717
(expandedChange)="node.isExpanded = $event"
1818
class="example-tree-node"
1919
tabindex="0">
20-
<button mat-icon-button cdkTreeNodeToggle
20+
<button matIconButton cdkTreeNodeToggle
2121
[attr.aria-label]="'Toggle ' + node.name"
2222
[style.visibility]="node.expandable ? 'visible' : 'hidden'">
2323
<mat-icon class="mat-icon-rtl-mirror">

src/components-examples/cdk/tree/cdk-tree-flat-children-accessor/cdk-tree-flat-children-accessor-example.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[isDisabled]="!shouldRender(node)"
66
class="example-tree-node">
77
<!-- use a disabled button to provide padding for tree leaf -->
8-
<button mat-icon-button disabled></button>
8+
<button matIconButton disabled></button>
99
{{node.name}}
1010
</cdk-tree-node>
1111
<!-- This is the tree node template for expandable nodes -->
@@ -16,7 +16,7 @@
1616
[isDisabled]="!shouldRender(node)"
1717
[isExpandable]="true"
1818
class="example-tree-node">
19-
<button mat-icon-button cdkTreeNodeToggle [attr.aria-label]="'Toggle ' + node.name">
19+
<button matIconButton cdkTreeNodeToggle [attr.aria-label]="'Toggle ' + node.name">
2020
<mat-icon class="mat-icon-rtl-mirror">
2121
{{tree.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
2222
</mat-icon>

src/components-examples/cdk/tree/cdk-tree-flat-level-accessor/cdk-tree-flat-level-accessor-example.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[isDisabled]="!shouldRender(node)"
66
class="example-tree-node">
77
<!-- use a disabled button to provide padding for tree leaf -->
8-
<button mat-icon-button disabled></button>
8+
<button matIconButton disabled></button>
99
{{node.name}}
1010
</cdk-tree-node>
1111
<!-- This is the tree node template for expandable nodes -->
@@ -16,7 +16,7 @@
1616
[isDisabled]="!shouldRender(node)"
1717
[isExpandable]="node.expandable"
1818
class="example-tree-node">
19-
<button mat-icon-button cdkTreeNodeToggle
19+
<button matIconButton cdkTreeNodeToggle
2020
[attr.aria-label]="'Toggle ' + node.name"
2121
[style.visibility]="node.expandable ? 'visible' : 'hidden'">
2222
<mat-icon class="mat-icon-rtl-mirror">

src/components-examples/cdk/tree/cdk-tree-flat/cdk-tree-flat-example.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[isDisabled]="!shouldRender(node)"
66
class="example-tree-node">
77
<!-- use a disabled button to provide padding for tree leaf -->
8-
<button mat-icon-button disabled></button>
8+
<button matIconButton disabled></button>
99
{{node.name}}
1010
</cdk-tree-node>
1111
<!-- This is the tree node template for expandable nodes -->
@@ -15,7 +15,7 @@
1515
[isDisabled]="!shouldRender(node)"
1616
(expandedChange)="node.isExpanded = $event"
1717
class="example-tree-node">
18-
<button mat-icon-button cdkTreeNodeToggle
18+
<button matIconButton cdkTreeNodeToggle
1919
[attr.aria-label]="'Toggle ' + node.name"
2020
[style.visibility]="node.expandable ? 'visible' : 'hidden'">
2121
<mat-icon class="mat-icon-rtl-mirror">

src/components-examples/cdk/tree/cdk-tree-nested-children-accessor/cdk-tree-nested-children-accessor-example.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<cdk-nested-tree-node #treeNode="cdkNestedTreeNode" *cdkTreeNodeDef="let node"
44
class="example-tree-node">
55
<!-- use a disabled button to provide padding for tree leaf -->
6-
<button mat-icon-button disabled></button>
6+
<button matIconButton disabled></button>
77
{{node.name}}
88
</cdk-nested-tree-node>
99
<!-- This is the tree node template for expandable nodes -->
@@ -13,7 +13,7 @@
1313
isExpandable
1414
class="example-tree-node">
1515
<button
16-
mat-icon-button
16+
matIconButton
1717
class="example-toggle"
1818
[attr.aria-label]="'Toggle ' + node.name"
1919
cdkTreeNodeToggle>

0 commit comments

Comments
 (0)