@@ -76,7 +76,7 @@ const DxcAccordion = ({
7676 iconSrc && < AccordionIcon src = { iconSrc } />
7777 ) }
7878 </ AccordionInfo >
79- < AccordionAssistiveText > { assistiveText } </ AccordionAssistiveText >
79+ { assistiveText && < AccordionAssistiveText > { assistiveText } </ AccordionAssistiveText > }
8080 </ ExpansionPanelSummary >
8181 < ExpansionPanelDetails >
8282 < AccordionText > { children } </ AccordionText >
@@ -119,8 +119,8 @@ DxcAccordion.propTypes = {
119119 PropTypes . oneOf ( [ ...Object . keys ( spaces ) ] ) ,
120120 ] ) ,
121121} ;
122-
123122const DXCAccordion = styled . div `
123+ display: flex;
124124 min-width: 280px;
125125 margin: ${ ( props ) => ( props . margin && typeof props . margin !== "object" ? spaces [ props . margin ] : "0px" ) } ;
126126 margin-top: ${ ( props ) =>
@@ -137,11 +137,13 @@ const DXCAccordion = styled.div`
137137 font-family: "Open Sans", sans-serif;
138138 cursor: ${ ( props ) => ( props . disabled && "not-allowed" ) || "pointer" } ;
139139 .MuiPaper-root {
140+ min-width: 0;
141+ display: flex;
140142 left: 85px;
141143 background-color: ${ ( props ) => props . theme . backgroundColor } !important;
142144 color: ${ ( props ) => props . theme . fontColor } ;
143145 box-shadow: 0px 6px 10px #00000024;
144- display: block;
146+
145147 position: static;
146148 width: 100%;
147149 border-radius: 4px;
@@ -150,7 +152,10 @@ const DXCAccordion = styled.div`
150152 border-radius: 4px;
151153 color: "#000000";
152154 }
153-
155+ &.MuiExpansionPanel-root {
156+ display: flex;
157+ flex-direction: column;
158+ }
154159 .MuiButtonBase-root.MuiExpansionPanelSummary-root {
155160 :hover {
156161 background-color: ${ ( props ) => `${ props . theme . hoverBackgroundColor } ` } ;
@@ -175,6 +180,7 @@ const DXCAccordion = styled.div`
175180
176181 .MuiExpansionPanelSummary-content {
177182 padding-right: 24px;
183+ min-width: 0;
178184 &.Mui-expanded {
179185 div:nth-child(2) {
180186 opacity: 1;
@@ -242,13 +248,10 @@ const AccordionInfo = styled.div`
242248 display: flex;
243249 flex-direction: row-reverse;
244250 align-items: center;
245- flex-grow: 1;
246- margin-right: 15px;
251+ margin-right: 48px;
247252` ;
248253
249- const AccordionLabel = styled . div `
250- flex-grow: 1;
251- ` ;
254+ const AccordionLabel = styled . div `` ;
252255
253256const AccordionText = styled . div `
254257 width: 100%;
@@ -259,6 +262,12 @@ const AccordionAssistiveText = styled.div`
259262 font-size: 14px;
260263 font: italic normal 300 16px/22px Open Sans;
261264 letter-spacing: 0.49px;
265+ flex: 1;
266+ white-space: nowrap;
267+ overflow: hidden;
268+ text-overflow: ellipsis;
269+ min-width: 100px;
270+ text-align: end;
262271` ;
263272
264273const IconContainer = styled . div `
0 commit comments