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 {
1515 label ?: string ;
1616 onClick ?: ( ) => void ;
1717 } ;
18+ testId ?: string ;
1819}
1920
2021export const InfoBar = ( {
2122 message,
2223 icon,
2324 callToAction,
25+ testId,
2426} : Readonly < Props > ) : JSX . Element => {
2527 return (
2628 < 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 >
2835 < 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+ >
3041 { message }
3142 </ Text . Button >
3243 </ Box >
@@ -36,6 +47,7 @@ export const InfoBar = ({
3647 < CallToAction
3748 onClick = { callToAction . onClick }
3849 label = { callToAction . label }
50+ data-testid = { testId ? `${ testId } -cta` : 'info-bar-cta' }
3951 />
4052 </ Box >
4153 ) }
You can’t perform that action at this time.
0 commit comments