File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ import {Toolbar} from '../toolbar/toolbar';
41
41
} )
42
42
export class Button {
43
43
private _role : string = 'button' ; // bar-button/item-button
44
- private _size : string = null ; // large/small
44
+ private _size : string = null ; // large/small/default
45
45
private _style : string = 'default' ; // outline/clear/solid
46
46
private _shape : string = null ; // round/fab
47
47
private _display : string = null ; // block/full
@@ -242,7 +242,7 @@ export class Button {
242
242
243
243
}
244
244
245
- const BUTTON_SIZE_ATTRS = [ 'large' , 'small' ] ;
245
+ const BUTTON_SIZE_ATTRS = [ 'large' , 'small' , 'default' ] ;
246
246
const BUTTON_STYLE_ATTRS = [ 'clear' , 'outline' , 'solid' ] ;
247
247
const BUTTON_SHAPE_ATTRS = [ 'round' , 'fab' ] ;
248
248
const BUTTON_DISPLAY_ATTRS = [ 'block' , 'full' ] ;
Original file line number Diff line number Diff line change @@ -143,7 +143,9 @@ export class Item {
143
143
@ContentChildren ( Button )
144
144
private set _buttons ( buttons ) {
145
145
buttons . toArray ( ) . forEach ( button => {
146
- if ( ! button . isItem ) {
146
+ // Don't add the item-button class if the user specifies
147
+ // a different size button
148
+ if ( ! button . isItem && ! button . _size ) {
147
149
button . addClass ( 'item-button' ) ;
148
150
}
149
151
} ) ;
Original file line number Diff line number Diff line change 49
49
</ ion-item >
50
50
51
51
< ion-item >
52
- < button clear item-left (click) ="testClick($event) ">
52
+ < button clear item-left default (click) ="testClick($event) ">
53
53
< ion-icon name ="navigate "> </ ion-icon >
54
54
</ button >
55
- icon only buttons
56
- < button clear item-right (click) ="testClick($event) ">
55
+ icon only buttons default
56
+ < button clear item-right default (click) ="testClick($event) ">
57
57
< ion-icon name ="navigate "> </ ion-icon >
58
58
</ button >
59
59
</ ion-item >
60
60
61
61
< ion-item >
62
- ion-item right icon/text button
63
- < button item-right (click) ="testClick($event) ">
62
+ ion-item right icon/text button large
63
+ < button item-right large (click) ="testClick($event) ">
64
64
< ion-icon name ="refresh "> </ ion-icon >
65
65
Refresh
66
66
</ button >
67
67
</ ion-item >
68
68
69
69
< ion-item >
70
- < button clear item-left (click) ="testClick($event) ">
70
+ < button clear item-left small (click) ="testClick($event) ">
71
71
< ion-icon name ="settings "> </ ion-icon >
72
72
Settings
73
73
</ button >
74
- ion-item left clear button
74
+ ion-item left clear button small
75
75
</ ion-item >
76
76
77
77
< ion-item >
You can’t perform that action at this time.
0 commit comments