-
-
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
[Pagination][material-ui] Bg color on hover not working properly while using extendTheme #38944
Comments
@Heet-Bhalodiya Thanks for reporting. The selected token is wrong. It should be --- a/packages/mui-material/src/PaginationItem/PaginationItem.js
+++ b/packages/mui-material/src/PaginationItem/PaginationItem.js
@@ -126,7 +126,7 @@ const PaginationItemPage = styled(ButtonBase, {
backgroundColor: (theme.vars || theme).palette.action.selected,
'&:hover': {
backgroundColor: theme.vars
- ? `rgba(${theme.vars.palette.action.selected} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.va
rs.palette.action.hoverOpacity}))`
+ ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${t
heme.vars.palette.action.hoverOpacity}))`
: alpha(
theme.palette.action.selected,
theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity, Not related to this issue, but the same should be for --- a/packages/mui-material/src/PaginationItem/PaginationItem.js
+++ b/packages/mui-material/src/PaginationItem/PaginationItem.js
@@ -138,7 +138,7 @@ const PaginationItemPage = styled(ButtonBase, {
},
[`&.${paginationItemClasses.focusVisible}`]: {
backgroundColor: theme.vars
- ? `rgba(${theme.vars.palette.action.selected} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.va
rs.palette.action.focusOpacity}))`
+ ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${t
heme.vars.palette.action.focusOpacity}))`
: alpha(
theme.palette.action.selected,
theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity, Would you like to create a Pull Request? |
hey i would like to work on this |
Ok, I will create a PR if @ValkonX33 can't complete this in 7 days. |
Hey i've implemented the following fix that you stated, is there anything that i might have to change as well? |
|
@ValkonX33 Yes, you can update it for |
…change to slight dark when hovered
Hello @ZeeshanTamboli i have created a PR can you please review |
Hey, I would like to work on this issue |
@mj12albert can you review my PR please and merge it? |
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example using
createTheme
:https://codesandbox.io/s/magical-water-n5wv4y?file=/src/mui-theme/ThemeProvider.tsx
Link to live example using
experimental_extendTheme
akaextendTheme
:https://codesandbox.io/s/nervous-chaplygin-jg76jc?file=/src/mui-theme/ThemeProvider.tsx:190-201
Current behavior 😯
When I create a theme using
createTheme
and hover over the default pagination component, it's background color updates to slight dark as it should. However, if I create a theme usingextendTheme
and hover over the default pagination component, it doesn't become dark like expected. Instead, it removes the background color.Expected behavior 🤔
When I implement the
extendTheme
, I expect the background color of the default pagination component to change to slight dark when hovered, similar to what I observe for pagination when using thecreateTheme
.Context 🔦
No response
Your environment 🌎
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: