mirror of
https://github.com/docmost/docmost.git
synced 2026-08-28 17:27:06 +08:00
fix(theme): size badges to their content
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
Badge,
|
||||||
createTheme,
|
createTheme,
|
||||||
CSSVariablesResolver,
|
CSSVariablesResolver,
|
||||||
MantineColorsTuple,
|
MantineColorsTuple,
|
||||||
@@ -38,6 +39,15 @@ export const theme = createTheme({
|
|||||||
red,
|
red,
|
||||||
},
|
},
|
||||||
components: {
|
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({
|
Tabs: Tabs.extend({
|
||||||
vars: (theme, props) => ({
|
vars: (theme, props) => ({
|
||||||
root: {
|
root: {
|
||||||
|
|||||||
Reference in New Issue
Block a user