File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
src/design-system/info-bar Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -15,18 +15,29 @@ export interface Props {
15
15
label ?: string ;
16
16
onClick ?: ( ) => void ;
17
17
} ;
18
+ testId ?: string ;
18
19
}
19
20
20
21
export const InfoBar = ( {
21
22
message,
22
23
icon,
23
24
callToAction,
25
+ testId,
24
26
} : Readonly < Props > ) : JSX . Element => {
25
27
return (
26
28
< Flex className = { cx . container } >
27
- < Box className = { cx . icon } > { icon } </ Box >
29
+ < Box
30
+ className = { cx . icon }
31
+ data-testid = { testId ? `${ testId } -icon` : 'info-bar-icon' }
32
+ >
33
+ { icon }
34
+ </ Box >
28
35
< Box >
29
- < Text . Button weight = "$semibold" className = { cx . message } >
36
+ < Text . Button
37
+ weight = "$semibold"
38
+ className = { cx . message }
39
+ data-testid = { testId ? `${ testId } -message` : 'info-bar-message' }
40
+ >
30
41
{ message }
31
42
</ Text . Button >
32
43
</ Box >
@@ -36,6 +47,7 @@ export const InfoBar = ({
36
47
< CallToAction
37
48
onClick = { callToAction . onClick }
38
49
label = { callToAction . label }
50
+ data-testid = { testId ? `${ testId } -cta` : 'info-bar-cta' }
39
51
/>
40
52
</ Box >
41
53
) }
You can’t perform that action at this time.
0 commit comments