File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/design-system/action-card Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,14 @@ type Props = Omit<OmitClassName<'div'>, 'title'> & {
1818 icon : ReactNode ;
1919 rootClassName ?: string ;
2020 iconClassName ?: string ;
21+ testId ?: string ;
2122} ;
2223
2324export const ActionCard = ( {
2425 title,
2526 description = '' ,
2627 icon,
28+ testId,
2729 ...props
2830} : Readonly < Props > ) : JSX . Element => (
2931 < Box { ...props } className = { classNames ( [ cx . root , props . rootClassName ] ) } >
@@ -32,6 +34,7 @@ export const ActionCard = ({
3234 mr = "$24"
3335 alignItems = "center"
3436 justifyContent = "center"
37+ data-testid = { testId ? `${ testId } -icon` : 'action-card-icon' }
3538 >
3639 { icon }
3740 </ Flex >
@@ -43,14 +46,21 @@ export const ActionCard = ({
4346 weight = { weight || '$medium' }
4447 color = { highlight ? 'highlight' : 'primary' }
4548 key = { text }
49+ data-testid = { testId ? `${ testId } -title` : 'action-card-title' }
4650 >
4751 { text } { ' ' }
4852 </ Text . Body . Normal >
4953 ) ) }
5054 </ Box >
5155 { description . length > 0 && (
5256 < Box mt = "$8" >
53- < Text . Body . Small weight = "$medium" color = "secondary" >
57+ < Text . Body . Small
58+ weight = "$medium"
59+ color = "secondary"
60+ data-testid = {
61+ testId ? `${ testId } -description` : 'action-card-description'
62+ }
63+ >
5464 { description }
5565 </ Text . Body . Small >
5666 </ Box >
You can’t perform that action at this time.
0 commit comments