Skip to content

Commit

Permalink
fix: font family not works in some interfaces, close #639
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzgydi authored Jun 29, 2023
1 parent 6cf174c commit f032228
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/components/log/log-item.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { styled, Box } from "@mui/material";

const Item = styled(Box)(({ theme: { palette } }) => ({
const Item = styled(Box)(({ theme: { palette, typography } }) => ({
padding: "8px 0",
margin: "0 12px",
lineHeight: 1.35,
borderBottom: `1px solid ${palette.divider}`,
fontSize: "0.875rem",
fontFamily: typography.fontFamily,
userSelect: "text",
"& .time": {
color: palette.text.secondary,
Expand Down
10 changes: 6 additions & 4 deletions src/components/proxy/proxy-item-mini.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,19 +166,21 @@ export const ProxyItemMini = (props: Props) => {
);
};

const Widget = styled(Box)(() => ({
const Widget = styled(Box)(({ theme: { typography } }) => ({
padding: "3px 6px",
fontSize: 14,
fontFamily: typography.fontFamily,
borderRadius: "4px",
}));

const TypeBox = styled(Box)(({ theme }) => ({
const TypeBox = styled(Box)(({ theme: { palette, typography } }) => ({
display: "inline-block",
border: "1px solid #ccc",
borderColor: alpha(theme.palette.text.secondary, 0.36),
color: alpha(theme.palette.text.secondary, 0.42),
borderColor: alpha(palette.text.secondary, 0.36),
color: alpha(palette.text.secondary, 0.42),
borderRadius: 4,
fontSize: 10,
fontFamily: typography.fontFamily,
marginRight: "4px",
padding: "0 2px",
lineHeight: 1.25,
Expand Down

0 comments on commit f032228

Please sign in to comment.