Skip to content

Commit f73ba71

Browse files
committed
fix: update spacing for tooltip
1 parent 6cc07b4 commit f73ba71

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

site/src/components/Avatar/Avatar.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,23 @@ import { FC } from "react";
55
import { css, type Interpolation, type Theme } from "@emotion/react";
66

77
export type AvatarProps = MuiAvatarProps & {
8-
size?: "sm" | "md" | "xl";
8+
size?: "xs" | "sm" | "md" | "xl";
99
colorScheme?: "light" | "darken";
1010
fitImage?: boolean;
1111
};
1212

1313
const sizeStyles = {
14+
xs: (theme) => ({
15+
width: theme.spacing(2),
16+
height: theme.spacing(2),
17+
fontSize: theme.spacing(1),
18+
fontWeight: 700,
19+
}),
1420
sm: (theme) => ({
1521
width: theme.spacing(3),
1622
height: theme.spacing(3),
1723
fontSize: theme.spacing(1.5),
24+
fontWeight: 600,
1825
}),
1926
md: {},
2027
xl: (theme) => ({

site/src/pages/UsersPage/UsersTable/GroupsCell.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function GroupsCell({ userGroups }: GroupsCellProps) {
8484
display: "flex",
8585
flexFlow: "column nowrap",
8686
fontSize: theme.typography.body2.fontSize,
87-
padding: theme.spacing(1, 0.5),
87+
padding: theme.spacing(0.5, 0.25),
8888
gap: theme.spacing(0),
8989
}}
9090
>
@@ -94,11 +94,11 @@ export function GroupsCell({ userGroups }: GroupsCellProps) {
9494
<ListItem
9595
key={group.id}
9696
css={{
97-
columnGap: theme.spacing(1.5),
97+
columnGap: theme.spacing(1.25),
9898
alignItems: "center",
9999
}}
100100
>
101-
<Avatar size="sm" src={group.avatar_url} alt={groupName}>
101+
<Avatar size="xs" src={group.avatar_url} alt={groupName}>
102102
{groupName}
103103
</Avatar>
104104

0 commit comments

Comments
 (0)