@@ -36,19 +36,19 @@ const project = {
36
36
37
37
const useStyles = makeStyles ( ( theme ) => ( {
38
38
tab : {
39
- minWidth : 'initial'
39
+ minWidth : 'initial' ,
40
+ '&.active' : {
41
+ color : '#000' ,
42
+ background : theme . palette . common . white ,
43
+ boxShadow : theme . shadows [ 1 ]
44
+ }
40
45
} ,
41
46
indicator : {
42
47
width : 4
43
48
} ,
44
49
tabLink : {
45
50
textDecoration : 'none' ,
46
- color : 'inherit' ,
47
- '&.active' : {
48
- color : '#000' ,
49
- background : theme . palette . common . white ,
50
- boxShadow : theme . shadows [ 1 ]
51
- }
51
+ color : 'inherit'
52
52
} ,
53
53
editorContainer : {
54
54
height : '100%' ,
@@ -148,21 +148,39 @@ const ComponentExample = ({ baseStructure, activeMapper, component }) => {
148
148
indicator : classes . indicator
149
149
} }
150
150
>
151
- < Link href = { `${ router . pathname } ?mapper=mui` } >
152
- < a href = { `${ router . pathname } ?mapper=mui` } className = { clsx ( classes . tabLink , { active : activeTab === 0 } ) } >
153
- < Tab className = { classes . tab } label = "Mui" />
154
- </ a >
155
- </ Link >
156
- < Link href = { `${ router . pathname } ?mapper=pf4` } >
157
- < a href = { `${ router . pathname } ?mapper=pf4` } className = { clsx ( classes . tabLink , { active : activeTab === 1 } ) } >
158
- < Tab className = { classes . tab } label = "PF4" />
159
- </ a >
160
- </ Link >
161
- < Link href = { `${ router . pathname } ?mapper=pf3` } >
162
- < a href = { `${ router . pathname } ?mapper=pf3` } className = { clsx ( classes . tabLink , { active : activeTab === 2 } ) } >
163
- < Tab className = { classes . tab } label = "PF3" />
164
- </ a >
165
- </ Link >
151
+ < Tab
152
+ onClick = { ( ) => router . push ( `${ router . pathname } ?mapper=mui` ) }
153
+ className = { clsx ( classes . tab , { active : activeTab === 0 } ) }
154
+ label = {
155
+ < Link href = { `${ router . pathname } ?mapper=mui` } >
156
+ < a href = { `${ router . pathname } ?mapper=mui` } className = { classes . tabLink } >
157
+ Mui
158
+ </ a >
159
+ </ Link >
160
+ }
161
+ />
162
+ < Tab
163
+ onClick = { ( ) => router . push ( `${ router . pathname } ?mapper=pf4` ) }
164
+ className = { clsx ( classes . tab , { active : activeTab === 1 } ) }
165
+ label = {
166
+ < Link href = { `${ router . pathname } ?mapper=pf4` } >
167
+ < a href = { `${ router . pathname } ?mapper=pf4` } className = { classes . tabLink } >
168
+ Pf4
169
+ </ a >
170
+ </ Link >
171
+ }
172
+ />
173
+ < Tab
174
+ onClick = { ( ) => router . push ( `${ router . pathname } ?mapper=pf3` ) }
175
+ className = { clsx ( classes . tab , { active : activeTab === 2 } ) }
176
+ label = {
177
+ < Link href = { `${ router . pathname } ?mapper=pf3` } >
178
+ < a href = { `${ router . pathname } ?mapper=pf3` } className = { classes . tabLink } >
179
+ Pf3
180
+ </ a >
181
+ </ Link >
182
+ }
183
+ />
166
184
</ Tabs >
167
185
< div id = "code-target" > </ div >
168
186
</ Box >
0 commit comments