fix(theme): size badges to their content

This commit is contained in:
Philipinho
2026-06-20 17:28:11 +01:00
parent e848c2a5b8
commit 02901ef2be
+10
View File
@@ -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: {