Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Tweak the BBAvatar initial font style in small size

天舟04aa9710c84d
diff --git a/frontend/src/bbkit/BBAvatar.vue b/frontend/src/bbkit/BBAvatar.vue
index 6a5825cb62..afd1ac8620 100644
--- a/frontend/src/bbkit/BBAvatar.vue
+++ b/frontend/src/bbkit/BBAvatar.vue
@@ -38,10 +38,17 @@ const BACKGROUND_COLOR_LIST: string[] = [
type SizeType = "small" | "normal" | "large" | "huge";
const sizeClassMap: Map<SizeType, string> = new Map([
- ["small", "w-6 h-6 text-xs font-normal"],
- ["normal", "w-8 h-8 text-sm font-normal"],
- ["large", "w-24 h-24 text-4xl font-medium"],
- ["huge", "w-36 h-36 text-5xl font-medium"],
+ ["small", "w-6 h-6 font-medium"],
+ ["normal", "w-8 h-8 font-medium"],
+ ["large", "w-24 h-24 font-medium"],
+ ["huge", "w-36 h-36 font-medium"],
+]);
+
+const fontStyleClassMap: Map<SizeType, string> = new Map([
+ ["small", "0.675rem"], // customized font size
+ ["normal", "0.875rem"], // text-sm
+ ["large", "2.25rem"], // text-4xl
+ ["huge", "3rem"], // text-5xl
]);
export default {
@@ -98,6 +105,7 @@ export default {
borderRadius: props.rounded ? "50%" : 0,
backgroundColor: backgroundColor.value,
color: "white",
+ "font-size": fontStyleClassMap.get(props.size),
};
});