File tree Expand file tree Collapse file tree 6 files changed +14
-7
lines changed Expand file tree Collapse file tree 6 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 112
112
</div >
113
113
{/if }
114
114
{#if properties .header .rightImage }
115
- <div role ="button" tabindex ="0" on:click ={handleRightImageClick } on:keydown data-pw ={` ${properties .header .dataPw }-button ` }>
115
+ <div role ="button" tabindex ="0" on:click ={handleRightImageClick } on:keydown data-pw ={` ${properties .header .buttonTestId } ` }>
116
116
<img class ="header-right-img" src ={properties .header .rightImage } alt =" " />
117
117
</div >
118
118
{/if }
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ export type ModalProperties = {
15
15
leftImage : string | null ;
16
16
rightImage : string | null ;
17
17
text : string | null ;
18
- dataPw ?: string | null ;
18
+ dataPw ?: string ;
19
+ buttonTestId ?: string ;
19
20
} ;
20
21
footer ?: {
21
22
primaryButton ?: ButtonProperties ,
Original file line number Diff line number Diff line change 138
138
</script >
139
139
140
140
{#if properties .label !== null && properties .label !== ' ' }
141
- <label class ="label-container" for ={properties .label } data-pw ={` ${properties .dataPw }-heading ` }>
141
+ <label class ="label-container" for ={properties .label } data-pw ={` ${properties .dataPwHeading } ` }>
142
142
{properties .label }
143
143
</label >
144
144
{/if }
220
220
class ="item {isSelected (properties .selectedItem , item ) ? ' item-selected' : ' ' }"
221
221
role =" button"
222
222
tabindex =" 0"
223
- data-pw ={` ${properties .dataPw }-item -${item } ` }
223
+ data-pw ={` ${properties .dataPwItemButton } -${item } ` }
224
224
>
225
225
{#if properties .selectMultipleItems }
226
226
<CheckListItem checked ={isSelected (properties .selectedItem , item )} text =" " />
Original file line number Diff line number Diff line change @@ -14,4 +14,6 @@ export type SelectProperties = {
14
14
showSelectedItem ?: boolean ;
15
15
showSelectedItemCount ?: boolean ;
16
16
dataPw ?: string ;
17
+ dataPwHeading ?: string ;
18
+ dataPwItemButton ?: string ;
17
19
} ;
Original file line number Diff line number Diff line change 104
104
</div >
105
105
{/if }
106
106
107
- <div class =" toast-message" >
107
+ <div class ="toast-message" data-pw ={ properties . dataPwMessage } >
108
108
{properties .message }
109
109
{#if properties .subtext }
110
- <div class ="toast-subtext" >{properties .subtext }</div >
110
+ <div class ="toast-subtext" data-pw ={ properties . dataPwSubText } >{properties .subtext }</div >
111
111
{/if }
112
112
113
113
{#if $$slots .bottomContent }
116
116
</div >
117
117
118
118
{#if properties .rightIcon }
119
- <div class ="close-button" tabindex ="0" role ="button" on:click ={hideToast } on:keypress >
119
+ <div class ="close-button" tabindex ="0" role ="button" on:click ={hideToast } on:keypress data-pw ={ properties . dataPwCloseIcon } >
120
120
<img class ="toast-icon" src ={properties .rightIcon } alt =" close-icon" />
121
121
</div >
122
122
{/if }
Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ export type ToastProperties = {
14
14
inAnimationDuration ?: number ;
15
15
outAnimationOffset ?: number ;
16
16
outAnimationDuration ?: number ;
17
+ dataPw ?: string ;
18
+ dataPwMessage ?: string ;
19
+ dataPwSubText ?: string ;
20
+ dataPwCloseIcon ?: string ;
17
21
} ;
18
22
19
23
export const defaultToastProperties : ToastProperties = {
You can’t perform that action at this time.
0 commit comments