Skip to content

Commit 71c9192

Browse files
committed
Adjust Nano theme for better legibility
1 parent ecaee9d commit 71c9192

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

docs/AppTheme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ export const App = () => (
145145
);
146146
```
147147

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

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

154154
### Radiant

examples/demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
rel="stylesheet"
107107
/>
108108
<link
109-
href="https://fonts.googleapis.com/css2?family=Onest:wght@300;400;500;700&display=swap"
109+
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap"
110110
rel="stylesheet"
111111
/>
112112
<link

packages/ra-ui-materialui/src/theme/nanoTheme.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ const componentsOverrides = (theme: Theme) => ({
5656
paddingBottom: theme.spacing(0.2),
5757
},
5858
},
59+
variants: [
60+
{
61+
props: { size: 'small' as const },
62+
style: { fontSize: '1em' },
63+
},
64+
],
5965
},
6066
MuiCard: {
6167
defaultProps: {
@@ -150,9 +156,6 @@ const componentsOverrides = (theme: Theme) => ({
150156
elevation1: {
151157
boxShadow: theme.shadows[1],
152158
},
153-
root: {
154-
backgroundColor: theme.palette.background.default,
155-
},
156159
},
157160
},
158161
MuiSnackbar: {
@@ -340,7 +343,7 @@ const lightPalette: PaletteOptions = {
340343
mode: 'light' as 'light',
341344
primary: { main: '#00585C' },
342345
secondary: { main: '#64B4B8' },
343-
background: { default: '#f9fafb' },
346+
background: { default: '#f4f4f4' },
344347
text: { primary: '#212b36' },
345348
...alert,
346349
};
@@ -355,13 +358,14 @@ const createNanoTheme = (palette: RaThemeOptions['palette']) => {
355358
},
356359
spacing: 8,
357360
typography: {
358-
fontFamily: 'Onest, sans-serif',
361+
fontFamily: 'Inter, sans-serif',
359362
fontSize: 12,
360363
h1: { fontSize: '7rem' },
361364
h2: { fontWeight: 400 },
362365
h3: { fontWeight: 500 },
363366
h4: { fontWeight: 700 },
364367
h5: { fontWeight: 700 },
368+
button: { textTransform: undefined },
365369
},
366370
};
367371
const theme = createTheme(themeOptions);

0 commit comments

Comments
 (0)