-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
[material-ui][TablePaginationActions] export TablePaginationActions as new component #46149
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
Conversation
Netlify deploy preview
@mui/material/TablePaginationActions: parsed: +Infinity% , gzip: +Infinity% Bundle size reportDetails of bundle changes (Toolpad) |
…/material-ui into table-pagination-actions
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.
@sai6855 Well done.
My last request, can you turn the root div
in TablePaginationActions
to a styled component, so that it is themable? It's for consistency with other components
const Root = styled('div', {
name: 'MuiTablePaginationActions',
slot: 'Root',
})
Also, need to update several files related to theme components types.
…/material-ui into table-pagination-actions
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.
@siriwatknp converted component to styled component and added component to theme files wherever applicable. This PR is ready for review now
classes, | ||
muiName: 'MuiTablePaginationActions', | ||
refInstanceof: window.HTMLDivElement, | ||
skip: ['componentsProp', 'componentProp', 'themeVariants'], |
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.
Removed classesRoot
, themeDefaultProps
, and themeStyleOverrides
. This test serves as proof that applying the root class and setting props from the theme are working correctly.
{ | ||
createTheme({ | ||
components: { | ||
MuiTablePaginationActions: { |
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.
ts test for presence of MuiTablePaginationActions in 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.
👍 Looks good. push a commit for updating the upgrade-to-v7 guide.
closes #46140
Api docs: https://deploy-preview-46149--material-ui.netlify.app/material-ui/api/table-pagination-actions/
Now users can do
import {TablePaginationActionsProps} from @mui/material/TablePaginationAction
, proof: https://stackblitz.com/edit/ueff8vmm?file=src%2FDemo.tsx