@@ -7,6 +7,8 @@ import React, { useEffect, useState } from "react";
7
7
import SVG from 'react-inlinesvg' ;
8
8
import styles from "./styles.module.css" ;
9
9
import { Tooltip } from "react-tooltip" ;
10
+ import Tabs from '@theme/Tabs' ;
11
+ import TabItem from '@theme/TabItem' ;
10
12
11
13
// { Done, In PR, Awaiting PR, Awaiting parents, Not solvable, Bot error }
12
14
// The third value is a boolean representing the default display state on load
@@ -90,8 +92,37 @@ export default function MigrationDetails() {
90
92
< div className = { `card margin-top--xs` } >
91
93
< div className = "card__header" >
92
94
< div className = { styles . migration_details_toggle } >
93
- < button onClick = { ( ) => toggle ( "table" ) } > Table View</ button > { " " }
94
- < button onClick = { ( ) => toggle ( "graph" ) } > Graph View</ button >
95
+ < div class = "tabs-container" >
96
+ < ul role = "tablist" aria-orientation = "horizontal" class = "tabs" >
97
+ < li
98
+ key = "table"
99
+ role = "tab"
100
+ class = { [ "tabs__item" , ( view == "table" ? "tabs__item--active" : null ) ] . join ( " " ) }
101
+ onClick = { ( ) => toggle ( "table" ) }
102
+ >
103
+ Table
104
+ </ li >
105
+ < li
106
+ key = "graph"
107
+ role = "tab"
108
+ class = { [ "tabs__item" , ( view == "graph" ? "tabs__item--active" : null ) ] . join ( " " ) }
109
+ onClick = { ( ) => toggle ( "graph" ) }
110
+ >
111
+ Graph
112
+ </ li >
113
+ { name &&
114
+ < a href = { urls . migrations . details . replace ( "<NAME>" , name ) } target = "_blank" >
115
+ < li
116
+ key = "raw"
117
+ role = "tab"
118
+ class = "tabs__item"
119
+ >
120
+ < span > Raw < i className = "fa fa-fw fa-arrow-up-right-from-square" > </ i > </ span >
121
+ </ li >
122
+ </ a >
123
+ }
124
+ </ ul >
125
+ </ div >
95
126
</ div >
96
127
< Breadcrumbs > { name } </ Breadcrumbs >
97
128
< div style = { { clear : "both" } } > </ div >
0 commit comments