-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[docs] Remove last dependencies on makeStyles
from @material-ui/core/styles
#26246
Conversation
}, | ||
})); | ||
}), | ||
{ defaultTheme }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where the code is not publicly visible on docs, or styles are too complicated, I used the defaultTheme
prop.
setChecked(newChecked); | ||
setExpandPaths(newChecked ? allNodeIds : []); | ||
onChange={(event) => { | ||
setChecked(event.target.checked); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops this was broken in #25871
twitter: { | ||
width: 160, | ||
display: 'flex', | ||
const Content = styled(Container)(({ theme }) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page is going away, it would have been simpler to change the import only (it seems).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh well..
@@ -207,7 +207,8 @@ const styles = (theme) => ({ | |||
}, | |||
}, | |||
}); | |||
const useStyles = makeStyles(styles, { name: 'MarkdownElement', flip: false }); | |||
const defaultTheme = createTheme(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the dark mode and RTL toggle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am setting only defaultTheme
. If there is a ThemeProvider
with different theme it will be picked up. Is there some scenario that is not working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK my bad
This PR removes last dependencies on
makeStyles
from@material-ui/core/styles
. Next step would be removing this util from the core.