Skip to content

Commit 74167a9

Browse files
committed
use tabs in migration details
1 parent e4aa301 commit 74167a9

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

src/pages/status/migration/index.jsx

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import React, { useEffect, useState } from "react";
77
import SVG from 'react-inlinesvg';
88
import styles from "./styles.module.css";
99
import { Tooltip } from "react-tooltip";
10+
import Tabs from '@theme/Tabs';
11+
import TabItem from '@theme/TabItem';
1012

1113
// { Done, In PR, Awaiting PR, Awaiting parents, Not solvable, Bot error }
1214
// The third value is a boolean representing the default display state on load
@@ -90,8 +92,35 @@ export default function MigrationDetails() {
9092
<div className={`card margin-top--xs`}>
9193
<div className="card__header">
9294
<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>
95124
</div>
96125
<Breadcrumbs>{name}</Breadcrumbs>
97126
<div style={{ clear: "both" }}></div>

0 commit comments

Comments
 (0)