File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
src/design-system/flow-card Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,15 @@ interface Props {
1414 icon ?: ReactNode ;
1515 name : string ;
1616 description ?: string ;
17+ testId ?: string ;
1718}
1819
1920export const Profile = ( {
2021 imageSrc,
2122 icon,
2223 name,
2324 description,
25+ testId,
2426} : Readonly < Props > ) : JSX . Element => {
2527 const renderProfileImage = ( ) => {
2628 if ( typeof icon !== 'undefined' ) {
@@ -34,18 +36,33 @@ export const Profile = ({
3436 < div className = { cx . container } >
3537 < Grid columns = "$fitContent" gutters = "$0" >
3638 < Cell >
37- < Flex className = { cx . image } alignItems = "center" h = "$fill" >
39+ < Flex
40+ className = { cx . image }
41+ alignItems = "center"
42+ h = "$fill"
43+ data-testid = { testId ? `${ testId } -image` : 'profile-image' }
44+ >
3845 { renderProfileImage ( ) }
3946 </ Flex >
4047 </ Cell >
4148 < Cell >
4249 < Flex justifyContent = "center" flexDirection = "column" h = "$fill" >
43- < Text . Body . Large color = "primary" weight = "$semibold" >
50+ < Text . Body . Large
51+ color = "primary"
52+ weight = "$semibold"
53+ data-testid = { testId ? `${ testId } -name` : 'profile-name' }
54+ >
4455 { name }
4556 </ Text . Body . Large >
4657 { description === undefined ? undefined : (
4758 < Box >
48- < Text . Body . Normal color = "secondary" weight = "$semibold" >
59+ < Text . Body . Normal
60+ color = "secondary"
61+ weight = "$semibold"
62+ data-testid = {
63+ testId ? `${ testId } -description` : 'profile-description'
64+ }
65+ >
4966 { description }
5067 </ Text . Body . Normal >
5168 </ Box >
You can’t perform that action at this time.
0 commit comments