File tree Expand file tree Collapse file tree 3 files changed +11
-24
lines changed
src/Shared/Components/DeploymentConfigDiff Expand file tree Collapse file tree 3 files changed +11
-24
lines changed Original file line number Diff line number Diff line change 40
40
& __tab-list {
41
41
list-style : none ;
42
42
}
43
-
44
- & __tab {
45
- & , & :hover {
46
- color : var (--N700 );
47
- }
48
-
49
- & --active , & --active :hover {
50
- color : var (--N900 );
51
- }
52
- }
53
43
}
Original file line number Diff line number Diff line change @@ -75,10 +75,8 @@ export interface DeploymentConfigDiffProps {
75
75
navHeading : string
76
76
navHelpText ?: string
77
77
tabConfig ?: {
78
- tabs : {
79
- value : string
80
- href : string
81
- } [ ]
78
+ tabs : string [ ]
79
+ activeTab : string
82
80
onClick : ( tab : string ) => void
83
81
}
84
82
}
Original file line number Diff line number Diff line change @@ -74,23 +74,22 @@ export const DeploymentConfigDiffNavigation = ({
74
74
)
75
75
76
76
const renderTabConfig = ( ) => {
77
- const { tabs } = tabConfig
77
+ const { tabs, activeTab } = tabConfig
78
78
79
79
return (
80
80
< div className = "p-12" >
81
81
< ul className = "deployment-config-diff__tab-list p-0 m-0 flexbox dc__align-items-center dc__border br-4 dc__text-center dc__overflow-hidden" >
82
82
{ tabs . map ( ( tab , index ) => (
83
83
< li className = { `flex-1 ${ index !== tabs . length - 1 ? 'dc__border-right' : '' } ` } >
84
- < NavLink
85
- key = { tab . value }
86
- to = { tab . href }
87
- activeClassName = "deployment-config-diff__tab--active bcn-1"
88
- className = { `deployment-config-diff__tab dc__inline-block w-100 dc__no-decor px-8 py-1 fs-12 lh-20 bcn-0 ${ isLoading ? 'dc__opacity-0_5 cursor-not-allowed' : '' } ` }
89
- onClick = { onTabClick ( tab . value ) }
90
- aria-disabled = { isLoading }
84
+ < button
85
+ key = { tab }
86
+ type = "button"
87
+ className = { `dc__transparent w-100 dc__no-decor px-8 py-1 fs-12 lh-20 fw-6 ${ activeTab === tab ? 'bcn-1 cn-9' : 'bcn-0 cn-7' } ${ isLoading ? 'dc__opacity-0_5 cursor-not-allowed' : '' } ` }
88
+ onClick = { onTabClick ( tab ) }
89
+ disabled = { isLoading }
91
90
>
92
- { tab . value }
93
- </ NavLink >
91
+ { tab }
92
+ </ button >
94
93
</ li >
95
94
) ) }
96
95
</ ul >
You can’t perform that action at this time.
0 commit comments