Skip to content

Commit 07c8b85

Browse files
committed
🧹
1 parent 4bf1a97 commit 07c8b85

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

site/src/components/Pill/Pill.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { type PaletteColor } from "@mui/material/styles";
21
import { type FC, type ReactNode, useMemo } from "react";
32
import { css, type Interpolation, type Theme, useTheme } from "@emotion/react";
43
import { colors } from "theme/colors";
@@ -38,7 +37,7 @@ const themeOverrides = {
3837

3938
const themeStyles =
4039
(type: PillType, lightBorder?: boolean) => (theme: Theme) => {
41-
const palette = theme.palette[type] as PaletteColor;
40+
const palette = theme.palette[type];
4241
return {
4342
backgroundColor: palette.dark,
4443
borderColor: lightBorder ? palette.light : palette.main,

site/src/pages/AuditPage/AuditLogRow/AuditLogRow.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,17 @@ import {
66
CloseDropdown,
77
OpenDropdown,
88
} from "components/DropdownArrows/DropdownArrows";
9-
import { Pill } from "components/Pill/Pill";
9+
import { Pill, type PillType } from "components/Pill/Pill";
1010
import { Stack } from "components/Stack/Stack";
1111
import { TimelineEntry } from "components/Timeline/TimelineEntry";
1212
import { UserAvatar } from "components/UserAvatar/UserAvatar";
1313
import { useState } from "react";
1414
import userAgentParser from "ua-parser-js";
1515
import { AuditLogDiff } from "./AuditLogDiff/AuditLogDiff";
1616
import { AuditLogDescription } from "./AuditLogDescription/AuditLogDescription";
17-
import { PaletteIndex } from "theme/theme";
1817
import { determineGroupDiff } from "./AuditLogDiff/auditUtils";
1918

20-
const httpStatusColor = (httpStatus: number): PaletteIndex => {
19+
const httpStatusColor = (httpStatus: number): PillType => {
2120
// redirects are successful
2221
if (httpStatus === 307) {
2322
return "success";

site/src/pages/TemplateVersionEditorPage/TemplateVersionStatusBadge.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { TemplateVersion } from "api/typesGenerated";
2-
import { FC, ReactNode } from "react";
1+
import { type TemplateVersion } from "api/typesGenerated";
2+
import { type FC, type ReactNode } from "react";
33
import CircularProgress from "@mui/material/CircularProgress";
44
import ErrorIcon from "@mui/icons-material/ErrorOutline";
55
import CheckIcon from "@mui/icons-material/CheckOutlined";
6-
import { Pill } from "components/Pill/Pill";
7-
import { PaletteIndex } from "theme/theme";
6+
import { Pill, type PillType } from "components/Pill/Pill";
87

98
export const TemplateVersionStatusBadge: FC<{
109
version: TemplateVersion;
@@ -27,7 +26,7 @@ const LoadingIcon: FC = () => {
2726
export const getStatus = (
2827
version: TemplateVersion,
2928
): {
30-
type?: PaletteIndex;
29+
type?: PillType;
3130
text: string;
3231
icon: ReactNode;
3332
} => {

site/src/theme/theme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { colors } from "./colors";
2-
import { ThemeOptions, createTheme, Theme } from "@mui/material/styles";
2+
import { createTheme, type ThemeOptions } from "@mui/material/styles";
33
import { BODY_FONT_FAMILY, borderRadius } from "./constants";
44

55
// MUI does not have aligned heights for buttons and inputs so we have to "hack" it a little bit

0 commit comments

Comments
 (0)