diff --git a/site/src/components/Logs/LogLine.tsx b/site/src/components/Logs/LogLine.tsx index 17943283b6..6d49f6ed3e 100644 --- a/site/src/components/Logs/LogLine.tsx +++ b/site/src/components/Logs/LogLine.tsx @@ -1,7 +1,6 @@ -import type { Interpolation, Theme } from "@emotion/react"; import type { FC, HTMLAttributes } from "react"; import type { LogLevel } from "#/api/typesGenerated"; -import { MONOSPACE_FONT_FAMILY } from "#/theme/constants"; +import { cn } from "#/utils/cn"; const DEFAULT_LOG_LINE_SIDE_PADDING = 24; @@ -17,65 +16,40 @@ type LogLineProps = { level: LogLevel; } & HTMLAttributes; -export const LogLine: FC = ({ level, ...divProps }) => { +export const LogLine: FC = ({ level, className, ...props }) => { return (
 	);
 };
 
-export const LogLinePrefix: FC> = (props) => {
-	return 
;
+export const LogLinePrefix: FC> = ({
+	className,
+	...props
+}) => {
+	return (
+		
+	);
 };
-
-const styles = {
-	line: (theme) => ({
-		margin: 0,
-		wordBreak: "break-all",
-		display: "flex",
-		alignItems: "center",
-		fontSize: 13,
-		color: theme.palette.text.primary,
-		fontFamily: MONOSPACE_FONT_FAMILY,
-		height: "auto",
-		padding: `0 var(--log-line-side-padding, ${DEFAULT_LOG_LINE_SIDE_PADDING}px)`,
-
-		"&.error": {
-			backgroundColor: theme.roles.error.background,
-			color: theme.roles.error.text,
-
-			"& .dashed-line": {
-				backgroundColor: theme.roles.error.outline,
-			},
-		},
-
-		"&.debug": {
-			backgroundColor: theme.roles.notice.background,
-			color: theme.roles.notice.text,
-
-			"& .dashed-line": {
-				backgroundColor: theme.roles.notice.outline,
-			},
-		},
-
-		"&.warn": {
-			backgroundColor: theme.roles.warning.background,
-			color: theme.roles.warning.text,
-
-			"& .dashed-line": {
-				backgroundColor: theme.roles.warning.outline,
-			},
-		},
-	}),
-
-	prefix: (theme) => ({
-		userSelect: "none",
-		margin: 0,
-		display: "inline-block",
-		color: theme.palette.text.secondary,
-		marginRight: 24,
-	}),
-} satisfies Record>;
diff --git a/site/src/components/Logs/Logs.tsx b/site/src/components/Logs/Logs.tsx
index cf40855b34..80a767a153 100644
--- a/site/src/components/Logs/Logs.tsx
+++ b/site/src/components/Logs/Logs.tsx
@@ -1,6 +1,6 @@
-import type { Interpolation, Theme } from "@emotion/react";
 import dayjs from "dayjs";
 import type { FC } from "react";
+import { cn } from "#/utils/cn";
 import { type Line, LogLine, LogLinePrefix } from "./LogLine";
 
 export const DEFAULT_LOG_LINE_SIDE_PADDING = 24;
@@ -17,7 +17,17 @@ export const Logs: FC = ({
 	className = "",
 }) => {
 	return (
-		
+
{lines.map((line) => ( @@ -33,18 +43,3 @@ export const Logs: FC = ({
); }; - -const styles = { - root: (theme) => ({ - minHeight: 156, - padding: "8px 0", - borderRadius: 8, - overflowX: "auto", - background: theme.palette.background.default, - - "&:not(:last-child)": { - borderBottom: `1px solid ${theme.palette.divider}`, - borderRadius: 0, - }, - }), -} satisfies Record>;