@@ -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,35 @@ 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
+ < li
114
+ key = "raw"
115
+ role = "tab"
116
+ class = "tabs__item"
117
+ >
118
+ < a href = { urls . migrations . details . replace ( "<NAME>" , name ) } target = "_blank" >
119
+ < span > Raw < i className = "fa fa-fw fa-arrow-up-right-from-square" > </ i > </ span >
120
+ </ a >
121
+ </ li >
122
+ </ ul >
123
+ </ div >
95
124
</ div >
96
125
< Breadcrumbs > { name } </ Breadcrumbs >
97
126
< div style = { { clear : "both" } } > </ div >
0 commit comments