Skip to content

Commit

Permalink
Fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndai committed Dec 20, 2024
1 parent 26e8ef7 commit 13d8ba0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,26 +136,27 @@ If you have such a condition, replace it with the [`theme.applyStyles()` functio
function App() {
return (
<Card
- sx={(theme) => ({
- sx={(theme) => ({
- backgroundColor: theme.palette.mode === 'dark' ? '#000' : '#fff',
- '&:hover': {
- backgroundColor: theme.palette.mode === 'dark' ? '#333' : '#f5f5f5',
- },
- })}
+ sx={(theme) => [
+ {
+ backgroundColor: '#fff',
+ '&:hover': {
+ backgroundColor: '#f5f5f5',
+ },
+ sx={[
+ {
+ backgroundColor: '#fff',
+ '&:hover': {
+ backgroundColor: '#f5f5f5',
+ },
+ },
+ (theme) =>
+ theme.applyStyles('dark', {
+ backgroundColor: '#000',
+ '&:hover': {
+ backgroundColor: '#333',
+ },
+ }),
+ ]}
+ ]}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import Card from '@mui/material/Card';
}),
(theme) =>
theme.applyStyles('dark', {
backgroundColor: theme.vars.palette.grey[50],
backgroundColor: theme.vars.palette.grey[900],
}),
]}
/>;
Expand Down

0 comments on commit 13d8ba0

Please sign in to comment.