Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new-log-viewer: Override JoyUI fontFamily and radius properties globally. #83

Merged
merged 3 commits into from
Oct 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 17 additions & 27 deletions new-log-viewer/src/components/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,38 +37,11 @@ const APP_THEME = extendTheme({
},
},
},
focus: {
default: {
outlineWidth: "3px",
},
},
fontFamily: {
body: "var(--ylv-ui-font-family)",
},
components: {
JoyButton: {
styleOverrides: {
root: {
borderRadius: "2px",
},
},
},
JoySelect: {
defaultProps: {
indicator: <KeyboardArrowDown/>,
},
styleOverrides: {
root: {
borderRadius: "2px",
},
},
},
JoyInput: {
styleOverrides: {
root: {
borderRadius: "2px",
},
},
},
JoyFormControl: {
styleOverrides: {
Expand All @@ -83,6 +56,23 @@ const APP_THEME = extendTheme({
},
},
},
focus: {
default: {
outlineWidth: "3px",
},
},
fontFamily: {
body: "var(--ylv-ui-font-family)",
},
radius: {
/* eslint-disable sort-keys */
xs: "2px",
sm: "2px",
md: "2px",
lg: "2px",
xl: "2px",
/* eslint-enable sort-keys */
},
Comment on lines +62 to +70
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider varying radius sizes and review ESLint rule usage

  1. The radius is set to "2px" for all size variants. Consider using different radii for different sizes to provide better visual distinction between components of varying sizes. For example:
radius: {
  xs: "2px",
  sm: "4px",
  md: "6px",
  lg: "8px",
  xl: "10px",
}
  1. The ESLint sort-keys rule is disabled for this section. If key sorting is generally preferred in the project, consider sorting the keys alphabetically to maintain consistency with other parts of the codebase.

Would you like assistance in implementing these suggestions?

});

export default APP_THEME;
Loading