@@ -21,47 +21,47 @@ export class ButtonDirective {
21
21
* Toggle the active state for the component. [docs]
22
22
* @type InputSignalWithTransform<boolean, unknown>
23
23
*/
24
- active : InputSignalWithTransform < boolean , unknown > = input ( false , { transform : booleanAttribute } ) ;
24
+ readonly active : InputSignalWithTransform < boolean , unknown > = input ( false , { transform : booleanAttribute } ) ;
25
25
26
26
/**
27
27
* Sets the color context of the component to one of CoreUI’s themed colors. [docs]
28
28
* @type InputSignal<Colors>
29
29
*/
30
- color : InputSignal < Colors > = input < Colors > ( 'primary' ) ;
30
+ readonly color : InputSignal < Colors > = input < Colors > ( 'primary' ) ;
31
31
32
32
/**
33
33
* Toggle the disabled state for the component.
34
34
* @type InputSignalWithTransform<boolean, unknown>
35
35
*/
36
- disabled : InputSignalWithTransform < boolean , unknown > = input ( false , { transform : booleanAttribute } ) ;
36
+ readonly disabled : InputSignalWithTransform < boolean , unknown > = input ( false , { transform : booleanAttribute } ) ;
37
37
38
38
/**
39
39
* Select the shape of the component.
40
40
* @type InputSignal<Shapes>
41
41
*/
42
- shape : InputSignal < Shapes | undefined > = input < Shapes > ( ) ;
42
+ readonly shape : InputSignal < Shapes | undefined > = input < Shapes > ( ) ;
43
43
44
44
/**
45
45
* Size the component small or large.
46
46
* @type InputSignal<'sm' | 'lg' | ''>
47
47
*/
48
- size : InputSignal < '' | 'sm' | 'lg' > = input < '' | 'sm' | 'lg' > ( '' ) ;
48
+ readonly size : InputSignal < '' | 'sm' | 'lg' > = input < '' | 'sm' | 'lg' > ( '' ) ;
49
49
50
50
/**
51
51
* Specifies the type of button. Always specify the type attribute for the `<button>` element.
52
52
* Different browsers may use different default types for the `<button>` element.
53
53
* @type InputSignal<ButtonType>
54
54
* @default 'button'
55
55
*/
56
- type : InputSignal < ButtonType > = input < ButtonType > ( 'button' ) ;
56
+ readonly type : InputSignal < ButtonType > = input < ButtonType > ( 'button' ) ;
57
57
58
58
/**
59
59
* Set the button variant to an outlined button or a ghost button.
60
60
* @type InputSignal<'ghost' | 'outline' | undefined>
61
61
*/
62
- variant : InputSignal < 'ghost' | 'outline' | undefined > = input < 'ghost' | 'outline' > ( ) ;
62
+ readonly variant : InputSignal < 'ghost' | 'outline' | undefined > = input < 'ghost' | 'outline' > ( ) ;
63
63
64
- hostClasses = computed ( ( ) => {
64
+ readonly hostClasses = computed ( ( ) => {
65
65
return {
66
66
btn : true ,
67
67
[ `btn-${ this . color ( ) } ` ] : ! ! this . color ( ) && ! this . variant ( ) ,
@@ -74,21 +74,21 @@ export class ButtonDirective {
74
74
} as Record < string , boolean > ;
75
75
} ) ;
76
76
77
- _disabled = computed ( ( ) => this . disabled ( ) ) ;
77
+ readonly _disabled = computed ( ( ) => this . disabled ( ) ) ;
78
78
79
- ariaDisabled = computed ( ( ) => {
79
+ readonly ariaDisabled = computed ( ( ) => {
80
80
return this . _disabled ( ) ? true : null ;
81
81
} ) ;
82
82
83
- attrDisabled = computed ( ( ) => {
83
+ readonly attrDisabled = computed ( ( ) => {
84
84
return this . _disabled ( ) ? '' : null ;
85
85
} ) ;
86
86
87
- tabIndex = computed ( ( ) => {
87
+ readonly tabIndex = computed ( ( ) => {
88
88
return this . _disabled ( ) ? '-1' : null ;
89
89
} ) ;
90
90
91
- isActive = computed ( ( ) => {
91
+ readonly isActive = computed ( ( ) => {
92
92
return < boolean > this . active ( ) || null ;
93
93
} ) ;
94
94
}
0 commit comments