Skip to content

Commit bd89a9d

Browse files
committed
refine: update style of environment variables in launcher offcanvas
1 parent 4629a00 commit bd89a9d

2 files changed

Lines changed: 26 additions & 48 deletions

File tree

client/src/features/sessionsV2/SessionView/EnvVariablesCard.tsx

Lines changed: 13 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19-
import cx from "classnames";
20-
import { Card, CardBody, Col, Row, Table } from "reactstrap";
19+
import { Col, ListGroup, ListGroupItem, Row } from "reactstrap";
2120

2221
import type { SessionLauncher } from "../api/sessionLaunchersV2.api";
2322

@@ -35,49 +34,17 @@ export default function EnvVariablesCard({
3534
}
3635

3736
return (
38-
<Card data-cy="env-variables-card" className={cx("border")}>
39-
<CardBody className={cx("d-flex", "flex-column")}>
40-
<Row>
41-
<Col
42-
xs={12}
43-
className={cx(
44-
"d-flex",
45-
"flex-wrap",
46-
"flex-sm-nowrap",
47-
"align-items-start",
48-
"justify-content-between",
49-
"pb-2",
50-
"gap-2"
51-
)}
52-
>
53-
<Table size="sm">
54-
<tbody>
55-
{envVariables.map((env) => (
56-
<EnvVariableRow
57-
key={env.name}
58-
env={env.name}
59-
value={env.value}
60-
/>
61-
))}
62-
</tbody>
63-
</Table>
64-
</Col>
65-
</Row>
66-
</CardBody>
67-
</Card>
68-
);
69-
}
70-
71-
interface EnvRowParameterProps {
72-
env: string;
73-
value: string | null | undefined;
74-
}
75-
76-
function EnvVariableRow({ env, value }: EnvRowParameterProps) {
77-
return (
78-
<tr>
79-
<th scope="row">{env}</th>
80-
<td>{value ?? ""}</td>
81-
</tr>
37+
<ListGroup>
38+
{envVariables.map(({ name, value }) => (
39+
<ListGroupItem key={`env-var-${name}`}>
40+
<Row>
41+
<Col xs={6} className="fw-bold">
42+
{name}
43+
</Col>
44+
<Col xs={6}>{value ?? ""}</Col>
45+
</Row>
46+
</ListGroupItem>
47+
))}
48+
</ListGroup>
8249
);
8350
}

client/src/features/sessionsV2/SessionView/SessionView.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { skipToken } from "@reduxjs/toolkit/query";
1919
import cx from "classnames";
2020
import { ReactNode, useCallback, useMemo, useState } from "react";
2121
import {
22+
Braces,
2223
CircleFill,
2324
Clock,
2425
Database,
@@ -559,8 +560,18 @@ export function SessionView({
559560
)}
560561
{launcher && (
561562
<div>
562-
<div className={cx("d-flex", "justify-content-between", "mb-2")}>
563-
<h4 className="my-auto">Environment Variables</h4>
563+
<div
564+
className={cx(
565+
"d-flex",
566+
"align-items-center",
567+
"justify-content-between",
568+
"mb-2"
569+
)}
570+
>
571+
<h4 className={cx("mb-0", "me-2")}>
572+
<Braces className={cx("me-1", "bi")} />
573+
Environment Variables
574+
</h4>
564575
<PermissionsGuard
565576
disabled={null}
566577
enabled={

0 commit comments

Comments
 (0)