@@ -102,7 +102,7 @@ const DxcTabs = ({
102102
103103 const scrollLeft = ( ) => {
104104 const scrollWidth = refTabList ?. current ?. offsetWidth * 0.75 ;
105- let moveX ;
105+ let moveX = 0 ;
106106 if ( countClick <= scrollWidth ) {
107107 moveX = 0 ;
108108 setScrollLeftEnabled ( false ) ;
@@ -118,7 +118,7 @@ const DxcTabs = ({
118118
119119 const scrollRight = ( ) => {
120120 const scrollWidth = refTabList ?. current ?. offsetWidth * 0.75 ;
121- let moveX ;
121+ let moveX = 0 ;
122122 if ( countClick + scrollWidth + refTabList ?. current ?. offsetWidth >= totalTabsWidth ) {
123123 moveX = totalTabsWidth - refTabList ?. current ?. offsetWidth ;
124124 setScrollRightEnabled ( false ) ;
@@ -221,7 +221,7 @@ const DxcTabs = ({
221221 < ScrollIndicator
222222 onClick = { scrollLeft }
223223 enabled = { enabledIndicator }
224- aria- disabled= { ! scrollLeftEnabled }
224+ disabled = { ! scrollLeftEnabled }
225225 aria-label = { translatedLabels . tabs . scrollLeft }
226226 tabIndex = { scrollLeftEnabled ? tabIndex : - 1 }
227227 minHeightTabs = { minHeightTabs }
@@ -251,20 +251,20 @@ const DxcTabs = ({
251251 onMouseLeave = { ( ) => {
252252 onTabHover ?.( null ) ;
253253 } }
254- > </ Tab >
254+ / >
255255 ) ) }
256256 </ TabList >
257257 < ActiveIndicator
258258 tabWidth = { activeIndicatorWidth }
259259 tabLeft = { activeIndicatorLeft }
260260 aria-disabled = { isActiveIndicatorDisabled }
261- > </ ActiveIndicator >
261+ / >
262262 </ TabsContentScroll >
263263 </ TabsContent >
264264 < ScrollIndicator
265265 onClick = { scrollRight }
266266 enabled = { enabledIndicator }
267- aria- disabled= { ! scrollRightEnabled }
267+ disabled = { ! scrollRightEnabled }
268268 aria-label = { translatedLabels . tabs . scrollRight }
269269 tabIndex = { scrollRightEnabled ? tabIndex : - 1 }
270270 minHeightTabs = { minHeightTabs }
@@ -278,10 +278,10 @@ const DxcTabs = ({
278278} ;
279279
280280const Underline = styled . div `
281+ position: absolute;
281282 left: 0;
282283 bottom: 0;
283284 width: 100%;
284- position: absolute;
285285 height: ${ ( props ) => props . theme . dividerThickness } ;
286286 background-color: ${ ( props ) => props . theme . dividerColor } ;
287287` ;
@@ -313,17 +313,17 @@ const ScrollIndicator = styled.button<{
313313 enabled : boolean ;
314314 minHeightTabs : number ;
315315} > `
316+ box-sizing: border-box;
316317 display: ${ ( props ) => ( props . enabled ? "flex" : "none" ) } ;
317- background-color: #ffffff;
318- font-size: 1.25rem;
318+ justify-content: center;
319319 min-width: ${ ( props ) => props . theme . scrollButtonsWidth } ;
320320 height: ${ ( props ) => props . minHeightTabs - 1 } px;
321321 padding: 0;
322- justify-content: center;
323- cursor: pointer;
324- border-bottom: solid ${ ( props ) => props . theme . dividerThickness } ${ ( props ) => props . theme . dividerColor } ;
325- box-sizing: border-box;
326322 border: none;
323+ background-color: #ffffff;
324+ font-size: 1.25rem;
325+ cursor: pointer;
326+
327327 &:hover {
328328 background-color: ${ ( props ) => `${ props . theme . hoverBackgroundColor } !important` } ;
329329 }
@@ -334,15 +334,7 @@ const ScrollIndicator = styled.button<{
334334 &:active {
335335 background-color: ${ ( props ) => `${ props . theme . pressedBackgroundColor } !important` } ;
336336 }
337- svg {
338- height: 20px;
339- width: 20px;
340- align-self: center;
341- fill: ${ ( props ) => props . theme . unselectedFontColor } ;
342- visibility: visible;
343- }
344- &[aria-disabled="true"] {
345- pointer-events: none;
337+ &:disabled {
346338 cursor: default;
347339 svg {
348340 visibility: hidden;
@@ -355,23 +347,29 @@ const ScrollIndicator = styled.button<{
355347 background-color: transparent !important;
356348 }
357349 }
350+
351+ svg {
352+ align-self: center;
353+ height: 20px;
354+ width: 20px;
355+ fill: ${ ( props ) => props . theme . unselectedFontColor } ;
356+ }
358357` ;
359358
360359const ActiveIndicator = styled . span < { tabLeft : number ; tabWidth : number } > `
360+ position: absolute;
361+ bottom: 0;
361362 left: ${ ( props ) => `${ props . tabLeft } px` } ;
362363 width: ${ ( props ) => `${ props . tabWidth } px` } ;
363- background-color: ${ ( props ) => props . theme . selectedUnderlineColor } ;
364- bottom: 0;
365364 height: ${ ( props ) => props . theme . selectedUnderlineThickness } ;
366- position: absolute ;
365+ background-color: ${ ( props ) => props . theme . selectedUnderlineColor } ;
367366 &[aria-disabled="true"] {
368367 background-color: ${ ( props ) => props . theme . disabledFontColor } ;
369368 display: none;
370369 }
371370` ;
372371
373372const TabsContent = styled . div `
374- display: flex;
375373 flex: 1 1 auto;
376374 display: inline-block;
377375 position: relative;
0 commit comments