1
1
import { Link , NavLink } from 'react-router-dom'
2
2
3
3
import { ReactComponent as ICErrorExclamation } from '@Icons/ic-error-exclamation.svg'
4
- import { ReactComponent as ICWarning } from '@Icons/ic-warning-y6 .svg'
4
+ import { ReactComponent as ICWarning } from '@Icons/ic-warning.svg'
5
5
import { ComponentSizeType } from '@Shared/constants'
6
6
7
7
import { TabGroupProps , TabProps } from './TabGroup.types'
@@ -27,27 +27,33 @@ const Tab = ({
27
27
case ComponentSizeType . medium :
28
28
return {
29
29
tabClassName : `fs-12 ${ ! hideTopPadding ? 'pt-6' : '' } ${ alignActiveBorderWithContainer ? 'pb-5' : 'pb-6' } ` ,
30
+ iconClassName : 'icon-dim-14' ,
31
+ badgeClassName : 'fs-11 lh-18 tab-group__tab__badge--medium' ,
30
32
}
31
33
default :
32
34
return {
33
35
tabClassName : `fs-13 ${ ! hideTopPadding ? 'pt-8' : '' } ${ alignActiveBorderWithContainer ? 'pb-7' : 'pb-8' } ` ,
36
+ iconClassName : 'icon-dim-16' ,
37
+ badgeClassName : 'fs-12 lh-20' ,
34
38
}
35
39
}
36
40
}
37
- const { tabClassName } = getClassNameBySize ( )
41
+ const { tabClassName, iconClassName , badgeClassName } = getClassNameBySize ( )
38
42
39
43
const getTabComponent = ( ) => {
40
44
const content = (
41
45
< >
42
- { showError && < ICErrorExclamation className = "icon-dim-14" /> }
43
- { ! showError && showWarning && < ICWarning className = "icon-dim-14" /> }
46
+ { showError && < ICErrorExclamation className = { ` ${ iconClassName } ` } /> }
47
+ { ! showError && showWarning && < ICWarning className = { ` ${ iconClassName } tab-group__tab__warning-icon` } /> }
44
48
{ ! showError && ! showWarning && Icon && (
45
49
< Icon
46
- className = { `icon-dim-14 ${ iconType === 'fill' ? 'tab-group__tab__icon--fill' : 'tab-group__tab__icon--stroke' } ${ ( active && ( iconType === 'fill' ? 'fcb-5' : 'scb-5' ) ) || ( iconType === 'fill' ? 'fcn-7' : 'scn-7' ) } ` }
50
+ className = { `${ iconClassName } ${ iconType === 'fill' ? 'tab-group__tab__icon--fill' : 'tab-group__tab__icon--stroke' } ${ ( active && ( iconType === 'fill' ? 'fcb-5' : 'scb-5' ) ) || ( iconType === 'fill' ? 'fcn-7' : 'scn-7' ) } ` }
47
51
/>
48
52
) }
49
53
{ label }
50
- { badge !== null && < div className = "tab-group__tab__badge bcn-1 flex fs-12 lh-18 cn-7" > { badge } </ div > }
54
+ { badge !== null && (
55
+ < div className = { `tab-group__tab__badge ${ badgeClassName } bcn-1 flex cn-7` } > { badge } </ div >
56
+ ) }
51
57
{ showIndicator && < span className = "tab-group__tab__indicator bcr-5 mt-4 dc__align-self-start" /> }
52
58
</ >
53
59
)
0 commit comments