Skip to content

Commit

Permalink
fix(alert): update radio/checkbox items to buttons elements
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Mar 6, 2016
1 parent 77b77d1 commit b24dc27
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
1 change: 0 additions & 1 deletion ionic/components/alert/alert.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ $alert-ios-checkbox-icon-checkmark-color: $background-ios-color !default;
.alert-tappable {
display: flex;
min-height: $alert-ios-button-min-height;
cursor: pointer;
}


Expand Down
1 change: 0 additions & 1 deletion ionic/components/alert/alert.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ $alert-md-button-text-align: right !default;
overflow: hidden;
display: flex;
min-height: 44px;
cursor: pointer;
}


Expand Down
11 changes: 11 additions & 0 deletions ionic/components/alert/alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,14 @@ ion-alert {
line-height: $alert-button-line-height;
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;
}
8 changes: 4 additions & 4 deletions ionic/components/alert/alert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,23 +219,23 @@ export class Alert extends ViewController {

'<template ngSwitchWhen="radio">' +
'<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-label">' +
'{{i.label}}' +
'</div>' +
'</div>' +
'</button>' +
'</div>' +
'</template>' +

'<template ngSwitchWhen="checkbox">' +
'<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-label">' +
'{{i.label}}' +
'</div>' +
'</div>' +
'</button>' +
'</div>' +
'</template>' +

Expand Down
1 change: 0 additions & 1 deletion ionic/components/alert/alert.wp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ ion-alert {
overflow: hidden;
display: flex;
min-height: 44px;
cursor: pointer;
}


Expand Down

0 comments on commit b24dc27

Please sign in to comment.