File tree 2 files changed +27
-14
lines changed
2 files changed +27
-14
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @rhds/elements " : minor
3
+ ---
4
+
5
+ ` <rh-alert> ` : removed deprecated toast boolean attribute
6
+
7
+ Before:
8
+ ``` html
9
+ <rh-alert toast >
10
+ <h3 slot =" header" >Default</h3 >
11
+ <p >
12
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eleifend
13
+ elit sed est egestas, a sollicitudin mauris tincidunt.
14
+ </p >
15
+ </rh-alert >
16
+ ```
17
+
18
+ After:
19
+ ``` html
20
+ <rh-alert variant =" toast" >
21
+ <h3 slot =" header" >Default</h3 >
22
+ <p >
23
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eleifend
24
+ elit sed est egestas, a sollicitudin mauris tincidunt.
25
+ </p >
26
+ </rh-alert >
27
+ ```
Original file line number Diff line number Diff line change @@ -85,9 +85,6 @@ export class RhAlert extends LitElement {
85
85
*/
86
86
@property ( { reflect : true } ) variant ?: 'alternate' | 'toast' | 'inline' ;
87
87
88
- /** @deprecated */
89
- @property ( { reflect : true , type : Boolean } ) toast = false ;
90
-
91
88
/**
92
89
* Alert variants have different rules regarding their ability to be dismissed by a user.
93
90
* Default, Info, and Success Inline alerts can be dismissed by a user selecting the close button.
@@ -105,17 +102,6 @@ export class RhAlert extends LitElement {
105
102
}
106
103
}
107
104
108
- willUpdate ( changed : PropertyValues < this> ) {
109
- // toast as a boolean attr is deprecated, so this replicates the previous behaviour
110
- if ( changed . has ( 'toast' ) && this . toast ) {
111
- this . variant = 'toast' ;
112
- }
113
- // variant as a boolean attr is deprecated, so this replicates the previous behaviour
114
- if ( changed . has ( 'variant' ) && ( this . variant as unknown as boolean ) === false ) {
115
- this . variant = undefined ;
116
- }
117
- }
118
-
119
105
render ( ) {
120
106
const hasActions = this . #slots. hasSlotted ( 'actions' ) ;
121
107
const hasBody = this . #slots. hasSlotted ( SlotController . anonymous as unknown as string ) ;
You can’t perform that action at this time.
0 commit comments