From 02901ef2be80bc328a0ed25780536f2a78d082ae Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Sat, 20 Jun 2026 17:28:11 +0100 Subject: [PATCH] fix(theme): size badges to their content --- apps/client/src/theme.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/client/src/theme.ts b/apps/client/src/theme.ts index 55367a134..9aaad79e3 100644 --- a/apps/client/src/theme.ts +++ b/apps/client/src/theme.ts @@ -1,4 +1,5 @@ import { + Badge, createTheme, CSSVariablesResolver, MantineColorsTuple, @@ -38,6 +39,15 @@ export const theme = createTheme({ red, }, components: { + // Size badges to their content; fit-content collapses inside table cells. + Badge: Badge.extend({ + styles: (_theme, props) => ({ + root: + props.fullWidth || props.circle + ? {} + : { width: "max-content", maxWidth: "100%" }, + }), + }), Tabs: Tabs.extend({ vars: (theme, props) => ({ root: {