mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
fix(alert): update radio/checkbox items to buttons elements
This commit is contained in:
@ -142,7 +142,6 @@ $alert-ios-checkbox-icon-checkmark-color: $background-ios-color !default;
|
|||||||
.alert-tappable {
|
.alert-tappable {
|
||||||
display: flex;
|
display: flex;
|
||||||
min-height: $alert-ios-button-min-height;
|
min-height: $alert-ios-button-min-height;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -127,7 +127,6 @@ $alert-md-button-text-align: right !default;
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
min-height: 44px;
|
min-height: 44px;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,3 +78,14 @@ ion-alert {
|
|||||||
line-height: $alert-button-line-height;
|
line-height: $alert-button-line-height;
|
||||||
font-size: $alert-button-font-size;
|
font-size: $alert-button-font-size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.alert-tappable {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
font-size: inherit;
|
||||||
|
line-height: initial;
|
||||||
|
text-align: left;
|
||||||
|
background: transparent;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
@ -219,23 +219,23 @@ export class Alert extends ViewController {
|
|||||||
|
|
||||||
'<template ngSwitchWhen="radio">' +
|
'<template ngSwitchWhen="radio">' +
|
||||||
'<div class="alert-radio-group" role="radiogroup" [attr.aria-labelledby]="hdrId" [attr.aria-activedescendant]="activeId">' +
|
'<div class="alert-radio-group" role="radiogroup" [attr.aria-labelledby]="hdrId" [attr.aria-activedescendant]="activeId">' +
|
||||||
'<div *ngFor="#i of d.inputs" (click)="rbClick(i)" [attr.aria-checked]="i.checked" [attr.id]="i.id" class="alert-tappable alert-radio" tappable role="radio">' +
|
'<button *ngFor="#i of d.inputs" (click)="rbClick(i)" [attr.aria-checked]="i.checked" [attr.id]="i.id" class="alert-tappable alert-radio" role="radio">' +
|
||||||
'<div class="alert-radio-icon"></div>' +
|
'<div class="alert-radio-icon"></div>' +
|
||||||
'<div class="alert-radio-label">' +
|
'<div class="alert-radio-label">' +
|
||||||
'{{i.label}}' +
|
'{{i.label}}' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</div>' +
|
'</button>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</template>' +
|
'</template>' +
|
||||||
|
|
||||||
'<template ngSwitchWhen="checkbox">' +
|
'<template ngSwitchWhen="checkbox">' +
|
||||||
'<div class="alert-checkbox-group">' +
|
'<div class="alert-checkbox-group">' +
|
||||||
'<div *ngFor="#i of d.inputs" (click)="cbClick(i)" [attr.aria-checked]="i.checked" class="alert-tappable alert-checkbox" tappable role="checkbox">' +
|
'<button *ngFor="#i of d.inputs" (click)="cbClick(i)" [attr.aria-checked]="i.checked" class="alert-tappable alert-checkbox" role="checkbox">' +
|
||||||
'<div class="alert-checkbox-icon"><div class="alert-checkbox-inner"></div></div>' +
|
'<div class="alert-checkbox-icon"><div class="alert-checkbox-inner"></div></div>' +
|
||||||
'<div class="alert-checkbox-label">' +
|
'<div class="alert-checkbox-label">' +
|
||||||
'{{i.label}}' +
|
'{{i.label}}' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</div>' +
|
'</button>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</template>' +
|
'</template>' +
|
||||||
|
|
||||||
|
@ -143,7 +143,6 @@ ion-alert {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
min-height: 44px;
|
min-height: 44px;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user