Skip to content

Commit 23404c6

Browse files
committed
use satisfies
1 parent 8808da4 commit 23404c6

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

site/src/components/Avatar/Avatar.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// eslint-disable-next-line no-restricted-imports -- Read above
33
import MuiAvatar, { AvatarProps as MuiAvatarProps } from "@mui/material/Avatar";
44
import { FC } from "react";
5-
import { css, type Theme } from "@emotion/react";
5+
import { css, type Interpolation, type Theme } from "@emotion/react";
66

77
export type AvatarProps = MuiAvatarProps & {
88
size?: "sm" | "md" | "xl";
@@ -11,26 +11,26 @@ export type AvatarProps = MuiAvatarProps & {
1111
};
1212

1313
const sizeStyles = {
14-
sm: (theme: Theme) => ({
14+
sm: (theme) => ({
1515
width: theme.spacing(3),
1616
height: theme.spacing(3),
1717
fontSize: theme.spacing(1.5),
1818
}),
1919
md: {},
20-
xl: (theme: Theme) => ({
20+
xl: (theme) => ({
2121
width: theme.spacing(6),
2222
height: theme.spacing(6),
2323
fontSize: theme.spacing(3),
2424
}),
25-
};
25+
} satisfies Record<string, Interpolation<Theme>>;
2626

2727
const colorStyles = {
2828
light: {},
29-
darken: (theme: Theme) => ({
29+
darken: (theme) => ({
3030
background: theme.palette.divider,
3131
color: theme.palette.text.primary,
3232
}),
33-
};
33+
} satisfies Record<string, Interpolation<Theme>>;
3434

3535
const fitImageStyles = css`
3636
& .MuiAvatar-img {

site/src/components/Dashboard/DeploymentBanner/DeploymentBannerView.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ const styles = {
2727
display: flex;
2828
align-items: center;
2929
`,
30-
category: (theme: Theme) => ({
30+
category: (theme) => ({
3131
marginRight: theme.spacing(2),
3232
color: theme.palette.text.primary,
3333
}),
34-
values: (theme: Theme) => ({
34+
values: (theme) => ({
3535
display: "flex",
3636
gap: theme.spacing(1),
3737
color: theme.palette.text.secondary,
3838
}),
39-
value: (theme: Theme) => css`
39+
value: (theme) => css`
4040
display: flex;
4141
align-items: center;
4242
gap: ${theme.spacing(0.5)};

0 commit comments

Comments
 (0)