Skip to content

Commit b39bfa4

Browse files
committed
add padding instead of fixed sizes
1 parent 5793eec commit b39bfa4

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

site/src/pages/UserSettingsPage/ExternalAuthPage/ExternalAuthPageView.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333
} from "components/MoreMenu/MoreMenu";
3434
import { TableEmpty } from "components/TableEmpty/TableEmpty";
3535
import type { ExternalAuthPollingState } from "pages/CreateWorkspacePage/CreateWorkspacePage";
36-
import { minWidth, padding, width } from "@mui/system";
36+
import { margin, minWidth, padding, width } from "@mui/system";
3737

3838
export type ExternalAuthPageViewProps = {
3939
isLoading: boolean;
@@ -119,17 +119,13 @@ const StyledBadge = styled(Badge)(({ theme }) => ({
119119
borderColor: `${theme.palette.secondary.main}`,
120120
borderWidth: "thin",
121121

122-
// The size of the badge content should be small, and should perfectly encapsulate the icon.
123-
// By default, the style has padding and a fixed size, which is too large.
124-
// Remove all default padding, and base the size off of the icon size. All based around text
125-
// sizing.
126-
// Ideally, we could use padding to accomplis this, but you have to override the default 'height' and
127-
// 'width' properties.
128-
padding: "0px",
122+
// Override the default minimum sizes, as they are larger than what we want.
129123
minHeight: "0px",
130124
minWidth: "0px",
131-
height: "1.4em",
132-
width: "1.4em",
125+
// Override the default "height", which is usually set to some constant value.
126+
height: "auto",
127+
// Padding adds some room for the icon to live in.
128+
padding: "0.1em",
133129
},
134130
}));
135131

0 commit comments

Comments
 (0)