Skip to content

Commit

Permalink
Merge pull request #10433 from marmelab/nano-adjustments
Browse files Browse the repository at this point in the history
Adjust Nano theme for better legibility
  • Loading branch information
slax57 authored Jan 6, 2025
2 parents 4d8b7bf + 71c9192 commit 5fc1098
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/AppTheme.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ export const App = () => (
);
```

You must also import the Onest font in your `index.html` file:
You must also import the Inter font in your `index.html` file:

```html
<link href="https://fonts.googleapis.com/css2?family=Onest:wght@300;400;500;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap" rel="stylesheet">
```

### Radiant
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Onest:wght@300;400;500;700&display=swap"
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap"
rel="stylesheet"
/>
<link
Expand Down
14 changes: 9 additions & 5 deletions packages/ra-ui-materialui/src/theme/nanoTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ const componentsOverrides = (theme: Theme) => ({
paddingBottom: theme.spacing(0.2),
},
},
variants: [
{
props: { size: 'small' as const },
style: { fontSize: '1em' },
},
],
},
MuiCard: {
defaultProps: {
Expand Down Expand Up @@ -150,9 +156,6 @@ const componentsOverrides = (theme: Theme) => ({
elevation1: {
boxShadow: theme.shadows[1],
},
root: {
backgroundColor: theme.palette.background.default,
},
},
},
MuiSnackbar: {
Expand Down Expand Up @@ -340,7 +343,7 @@ const lightPalette: PaletteOptions = {
mode: 'light' as 'light',
primary: { main: '#00585C' },
secondary: { main: '#64B4B8' },
background: { default: '#f9fafb' },
background: { default: '#f4f4f4' },
text: { primary: '#212b36' },
...alert,
};
Expand All @@ -355,13 +358,14 @@ const createNanoTheme = (palette: RaThemeOptions['palette']) => {
},
spacing: 8,
typography: {
fontFamily: 'Onest, sans-serif',
fontFamily: 'Inter, sans-serif',
fontSize: 12,
h1: { fontSize: '7rem' },
h2: { fontWeight: 400 },
h3: { fontWeight: 500 },
h4: { fontWeight: 700 },
h5: { fontWeight: 700 },
button: { textTransform: undefined },
},
};
const theme = createTheme(themeOptions);
Expand Down

0 comments on commit 5fc1098

Please sign in to comment.