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

Commit c06ab12

Browse files
jamesbutkovicnshahan
authored andcommitted
Allow 'no' button disablement for MaterialYesNoButtons
PiperOrigin-RevId: 219826342
1 parent 49a4b3d commit c06ab12

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

angular_components/lib/material_yes_no_buttons/material_yes_no_buttons.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ class MaterialYesNoButtonsComponent implements HasDisabled {
9999
@Input()
100100
bool yesDisplayed = true;
101101

102+
/// Whether the no button should be disabled.
103+
///
104+
/// Default value is `false`.
105+
@Input()
106+
bool noDisabled = false;
107+
102108
/// Whether the no button should be displayed.
103109
///
104110
/// Default value is `true`.

angular_components/lib/material_yes_no_buttons/material_yes_no_buttons.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*ngIf="!pending && noDisplayed"
2121
class="btn btn-no"
2222
[raised]="raised"
23-
[disabled]="disabled"
23+
[disabled]="noDisabled || disabled"
2424
(trigger)="onNo($event)">
2525
{{noText}}
2626
</material-button>

0 commit comments

Comments
 (0)