File tree 2 files changed +10
-1
lines changed
ui/webui/resources/cr_elements/cr_button
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import type { CrButtonElement } from './cr_button.js';
8
8
9
9
export function getHtml ( this : CrButtonElement ) {
10
10
return html `
11
- < leo-button id ="button " kind ="outline " size ="small ">
11
+ < leo-button id ="button " kind ="outline " size ="${ this . size } ">
12
12
< slot slot ="icon-before " name ="prefix-icon "> </ slot >
13
13
< slot > </ slot >
14
14
< slot slot ="icon-after " name ="suffix-icon "> </ slot >
Original file line number Diff line number Diff line change @@ -52,12 +52,17 @@ leo-button {
52
52
class : {
53
53
type : String ,
54
54
reflect : true ,
55
+ } ,
56
+ size : {
57
+ type : String ,
58
+ reflect : true ,
55
59
}
56
60
} ;
57
61
}
58
62
59
63
disabled : boolean = false ;
60
64
class : string = '' ;
65
+ size = 'small' ;
61
66
62
67
private onClick_ ( e : Event ) {
63
68
if ( this . disabled ) {
@@ -92,6 +97,10 @@ leo-button {
92
97
this . $ . button . removeAttribute ( 'isDisabled' )
93
98
}
94
99
}
100
+
101
+ if ( changedProperties . has ( 'size' ) ) {
102
+ this . $ . button . setAttribute ( 'size' , this . size )
103
+ }
95
104
}
96
105
97
106
private classChanged ( ) {
You can’t perform that action at this time.
0 commit comments