Skip to content

Commit b329fec

Browse files
authored
Fix oppia#19536: Adds hover effect to subscribe button on android page (oppia#19565)
* button replaced by primary-button in android page, also disabled attribute added * fix linter error
1 parent 03b8db5 commit b329fec

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<button type="submit"
22
class="oppia-primary-button"
33
[ngClass]="customClasses"
4+
[disabled]="disabled"
45
(click)="handleButtonClick()">
56
{{ buttonText }}
67
</button>

core/templates/components/button-directives/primary-button.component.ts

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import './primary-button.component.css';
3131
export class PrimaryButtonComponent {
3232
@Input() buttonText: string = '';
3333
@Input() customClasses?: string[];
34+
@Input() disabled?: boolean = false;
3435
@Input() buttonHref: string | null = null;
3536
@Output() onClickPrimaryButton: EventEmitter<void> = new EventEmitter<void>();
3637

core/templates/pages/android-page/android-page.component.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@
205205
Please confirm before subscribing.
206206
</div>
207207
<div class="oppia-android-updates-input-padding text-center">
208-
<button [disabled]="!userCanSubscribe || !validateEmailAddress()"
209-
(click)="subscribeToAndroidList()"
210-
class="btn oppia-android-updates-button w-100">
211-
{{ 'I18N_ANDROID_PAGE_UPDATES_SUBMIT_BUTTON_TEXT' | translate }}
212-
</button>
208+
<oppia-primary-button [disabled]="!userCanSubscribe || !validateEmailAddress()"
209+
(onClickPrimaryButton)="subscribeToAndroidList()"
210+
[customClasses]="'btn oppia-android-updates-button w-100'"
211+
[buttonText]="'I18N_ANDROID_PAGE_UPDATES_SUBMIT_BUTTON_TEXT' | translate">
212+
</oppia-primary-button>
213213
</div>
214214
</div>
215215
<div *ngIf="userHasSubscribed"

0 commit comments

Comments
 (0)