From e67f0f6f520c75343a941efdac63c4734739ab36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=B1=E3=82=A4=E3=83=A9?= Date: Mon, 18 Aug 2025 16:16:21 -0600 Subject: [PATCH] chore: convert emotion styles to tailwind (#19347) --- site/src/components/EmptyState/EmptyState.tsx | 38 ++++--------- .../components/FullPageForm/FullPageForm.tsx | 2 +- site/src/components/LastSeen/LastSeen.tsx | 2 +- site/src/components/Latency/Latency.tsx | 22 +++----- .../PaginationWidget/PaginationWidgetBase.tsx | 11 +--- site/src/components/Paywall/Paywall.tsx | 46 +++------------ .../SelectMenu/SelectMenu.stories.tsx | 4 +- site/src/components/SelectMenu/SelectMenu.tsx | 56 +++++++++++-------- site/src/components/Sidebar/Sidebar.tsx | 2 +- .../SyntaxHighlighter/SyntaxHighlighter.tsx | 5 +- .../TableEmpty/TableEmpty.stories.tsx | 8 +-- site/src/components/TableEmpty/TableEmpty.tsx | 2 +- .../components/TableToolbar/TableToolbar.tsx | 17 +----- .../modules/dashboard/Navbar/ProxyMenu.tsx | 19 ++----- .../AnnouncementBannerSettings.tsx | 4 +- .../pages/TemplatesPage/EmptyTemplates.tsx | 15 +---- .../SecurityPage/SingleSignOnSection.tsx | 7 +-- 17 files changed, 81 insertions(+), 179 deletions(-) diff --git a/site/src/components/EmptyState/EmptyState.tsx b/site/src/components/EmptyState/EmptyState.tsx index 1371d7e9fa..3faede44dd 100644 --- a/site/src/components/EmptyState/EmptyState.tsx +++ b/site/src/components/EmptyState/EmptyState.tsx @@ -1,4 +1,5 @@ import type { FC, HTMLAttributes, ReactNode } from "react"; +import { cn } from "utils/cn"; export interface EmptyStateProps extends HTMLAttributes { /** Text Message to display, placed inside Typography component */ @@ -21,44 +22,25 @@ export const EmptyState: FC = ({ cta, image, isCompact, + className, ...attrs }) => { return (
-
{message}
+
{message}
{description && ( -

({ - marginTop: 16, - fontSize: 16, - lineHeight: "140%", - maxWidth: 480, - color: theme.palette.text.secondary, - })} - > +

{description}

)} - {cta &&
{cta}
} + {cta &&
{cta}
} {image}
); diff --git a/site/src/components/FullPageForm/FullPageForm.tsx b/site/src/components/FullPageForm/FullPageForm.tsx index 571cc56ea9..b4825731bc 100644 --- a/site/src/components/FullPageForm/FullPageForm.tsx +++ b/site/src/components/FullPageForm/FullPageForm.tsx @@ -19,7 +19,7 @@ export const FullPageForm: FC = ({ }) => { return ( - + {title} {detail && {detail}} diff --git a/site/src/components/LastSeen/LastSeen.tsx b/site/src/components/LastSeen/LastSeen.tsx index 02c98a09bf..1dd8444df4 100644 --- a/site/src/components/LastSeen/LastSeen.tsx +++ b/site/src/components/LastSeen/LastSeen.tsx @@ -40,7 +40,7 @@ export const LastSeen: FC = ({ at, className, ...attrs }) => { return ( diff --git a/site/src/components/Latency/Latency.tsx b/site/src/components/Latency/Latency.tsx index de5c5dc285..136d79bb5b 100644 --- a/site/src/components/Latency/Latency.tsx +++ b/site/src/components/Latency/Latency.tsx @@ -25,11 +25,7 @@ export const Latency: FC = ({ if (isLoading) { return ( - + ); } @@ -38,22 +34,20 @@ export const Latency: FC = ({ const notAvailableText = "Latency not available"; return ( - + <> + {notAvailableText} + + + ); } return ( -

+

Latency: {latency.toFixed(0)} ms -

+
); }; diff --git a/site/src/components/PaginationWidget/PaginationWidgetBase.tsx b/site/src/components/PaginationWidget/PaginationWidgetBase.tsx index 2022461a40..02b5d39a6b 100644 --- a/site/src/components/PaginationWidget/PaginationWidgetBase.tsx +++ b/site/src/components/PaginationWidget/PaginationWidgetBase.tsx @@ -39,16 +39,7 @@ export const PaginationWidgetBase: FC = ({ ); return ( -
+
= ({ return (
- -
{message}
+ +
{message}
- {description &&

{description}

} + {description && ( +

{description}

+ )} Read the documentation
-
+
-