[docs] Fix RTL toggle highlight in docs settings drawer by sai6855 · Pull Request #48476 · mui/material-ui (original) (raw)
Pull request overview
This PR fixes the docs settings drawer so the selected text-direction toggle reflects the actual direction state by propagating the current direction into the docs branding theme provider. In the broader docs app, this keeps useTheme() consumers aligned with the direction managed in ThemeOptionsContext.
Changes:
- Pass the current
directionprop fromBrandingCssVarsProviderintoBrandingCssThemeProvider. - Ensure components reading
theme.directioninside the docs shell, including the settings drawer toggle state, stay in sync with RTL/LTR changes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.