File tree Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -63,20 +63,25 @@ const SnackbarStandAloneComponent = (
63
63
</ SnackbarLinkWrapper >
64
64
) ;
65
65
66
- const buildDescription = ( ) =>
67
- props . description ?. content &&
68
- ( props . styles ?. description ?. font_variant || props . description . variant ) && (
69
- < SnackbarDescriptionWrapper styles = { props . styles } >
70
- < Text
71
- component = { TextComponentType . PARAGRAPH }
72
- customTypography = { props . styles ?. description }
73
- dataTestId = { `${ props . dataTestId } Description` }
74
- { ...props . description }
75
- >
76
- { props . description ?. content }
77
- </ Text >
78
- </ SnackbarDescriptionWrapper >
66
+ const buildDescription = ( ) => {
67
+ const { content, ...restDescriptionProps } = props . description || { } ;
68
+
69
+ return (
70
+ content &&
71
+ ( props . styles ?. description ?. font_variant || props . description ?. variant ) && (
72
+ < SnackbarDescriptionWrapper styles = { props . styles } >
73
+ < Text
74
+ component = { TextComponentType . PARAGRAPH }
75
+ customTypography = { props . styles ?. description }
76
+ dataTestId = { `${ props . dataTestId } Description` }
77
+ { ...restDescriptionProps }
78
+ >
79
+ { content }
80
+ </ Text >
81
+ </ SnackbarDescriptionWrapper >
82
+ )
79
83
) ;
84
+ } ;
80
85
81
86
return (
82
87
< Popover
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ const TextStandAloneComponent = (
32
32
$transform = { transform }
33
33
align = { align }
34
34
as = { component }
35
+ content = { undefined }
35
36
data-testid = { dataTestId }
36
37
htmlFor = { htmlFor }
37
38
id = { id }
You can’t perform that action at this time.
0 commit comments