Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions examples/demo/src/themes/softTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ export const softDarkTheme = {
elevation: 1,
},
},
RaToolbar: {
styleOverrides: {
root: {
backgroundColor: '#616161',
},
},
},
},
};

Expand Down
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/form/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const StyledToolbar = styled(MuiToolbar, {
name: PREFIX,
overridesResolver: (props, styles) => styles.root,
})(({ theme }) => ({
backgroundColor: (theme.vars || theme).palette.divider,
backgroundColor: (theme.vars || theme).palette.background.paper,

[`&.${ToolbarClasses.desktopToolbar}`]: {},

Expand Down
17 changes: 17 additions & 0 deletions packages/ra-ui-materialui/src/theme/defaultTheme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ThemeOptions } from '@mui/material';
import { grey } from '@mui/material/colors';
import { deepmerge } from '@mui/utils';

const defaultThemeInvariants: ThemeOptions = {
Expand Down Expand Up @@ -96,6 +97,13 @@ export const defaultLightTheme: ThemeOptions = deepmerge(
},
},
},
RaToolbar: {
styleOverrides: {
root: {
backgroundColor: grey[100],
},
},
},
},
}
);
Expand All @@ -112,6 +120,15 @@ export const defaultDarkTheme: ThemeOptions = deepmerge(
default: '#313131',
},
},
components: {
RaToolbar: {
styleOverrides: {
root: {
backgroundColor: grey[900],
},
},
},
},
}
);

Expand Down
Loading