Skip to content
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

[Table] Migrate TablePagination to emotion #25809

Merged
merged 29 commits into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
32b3c00
migrate TablePagination to emotion
siriwatknp Apr 17, 2021
bae56bf
prevent isRtl from passing through html
siriwatknp Apr 17, 2021
70d511d
wrap TablePagination with tr
siriwatknp Apr 17, 2021
00d8128
add overridesResolver to each Slot
siriwatknp Apr 17, 2021
30af1a1
update docs to use `components` prop
siriwatknp Apr 17, 2021
296591c
add shouldForwardProps and fix the toolbar styles
siriwatknp Apr 17, 2021
ae19142
update docs api
siriwatknp Apr 17, 2021
67a48b7
fix toolbar styling
siriwatknp Apr 17, 2021
3132d07
revert demo and component to use the same API
siriwatknp Apr 17, 2021
3c256e3
remove deprecated CSS API & fix styling
siriwatknp Apr 17, 2021
e480d0b
sort asc
oliviertassinari Apr 17, 2021
9bde376
follow ListItem template
oliviertassinari Apr 17, 2021
4f07dfc
it doesn't need the theme
oliviertassinari Apr 17, 2021
3f4ec94
no need to clone
oliviertassinari Apr 17, 2021
680bff4
no need for a callback
oliviertassinari Apr 17, 2021
892bf04
shorter
oliviertassinari Apr 17, 2021
828587c
naming convention
oliviertassinari Apr 17, 2021
a1e9039
remove Typography
oliviertassinari Apr 17, 2021
7060b99
keep the same DOM structure as before
oliviertassinari Apr 17, 2021
e6d13fb
fix visual regression
oliviertassinari Apr 17, 2021
c0f326b
use the same comment as in the other components
oliviertassinari Apr 17, 2021
63b19d5
no breaking changes
oliviertassinari Apr 17, 2021
723d4b1
need to be handled in v5
oliviertassinari Apr 17, 2021
e1c9764
remove noise
oliviertassinari Apr 17, 2021
4ae6aef
leave migration direction for v5
oliviertassinari Apr 17, 2021
7ab9c3c
fix theme overrides
oliviertassinari Apr 17, 2021
3681e7e
make the CSS selector structure clearer
oliviertassinari Apr 17, 2021
22031a8
revert styling to v4 version
siriwatknp Apr 18, 2021
abf563b
Update packages/material-ui/src/TablePagination/TablePagination.js
mnajdova Apr 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/pages/api-docs/table-pagination.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
},
"SelectProps": { "type": { "name": "object" }, "default": "{}" },
"showFirstButton": { "type": { "name": "bool" } },
"showLastButton": { "type": { "name": "bool" } }
"showLastButton": { "type": { "name": "bool" } },
"sx": { "type": { "name": "object" } }
},
"name": "TablePagination",
"styles": {
Expand All @@ -53,6 +54,6 @@
"filename": "/packages/material-ui/src/TablePagination/TablePagination.js",
"inheritance": { "component": "TableCell", "pathname": "/api/table-cell/" },
"demos": "<ul><li><a href=\"/components/tables/\">Tables</a></li></ul>",
"styledComponent": false,
"styledComponent": true,
"cssComponent": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"rowsPerPageOptions": "Customizes the options of the rows per page select field. If less than two options are available, no select field will be displayed.",
"SelectProps": "Props applied to the rows per page <a href=\"/api/select/\"><code>Select</code></a> element.",
"showFirstButton": "If <code>true</code>, show the first-page button.",
"showLastButton": "If <code>true</code>, show the last-page button."
"showLastButton": "If <code>true</code>, show the last-page button.",
"sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the <a href=\"/system/basics/#the-sx-prop\">`sx` page</a> for more details."
},
"classDescriptions": {
"root": { "description": "Styles applied to the root element." },
Expand All @@ -35,7 +36,7 @@
},
"selectRoot": {
"description": "Styles applied to {{nodeName}}.",
"nodeName": "the Select component root element"
"nodeName": "the Select component `root` element"
},
"select": {
"description": "Styles applied to {{nodeName}}.",
Expand All @@ -47,7 +48,7 @@
},
"input": {
"description": "Styles applied to {{nodeName}}.",
"nodeName": "the InputBase component"
"nodeName": "the Select component `root` element"
},
"menuItem": {
"description": "Styles applied to {{nodeName}}.",
Expand Down
10 changes: 8 additions & 2 deletions packages/material-ui/src/TablePagination/TablePagination.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import * as React from 'react';
import { SxProps } from '@material-ui/system';
import { Theme } from '../styles';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { TablePaginationActionsProps } from './TablePaginationActions';
import { TableCellProps } from '../TableCell';
Expand Down Expand Up @@ -37,13 +39,13 @@ export interface TablePaginationTypeMap<P, D extends React.ElementType> {
spacer?: string;
/** Styles applied to the select label Typography element. */
selectLabel?: string;
/** Styles applied to the Select component root element. */
/** Styles applied to the Select component `root` element. */
selectRoot?: string;
/** Styles applied to the Select component `select` class. */
select?: string;
/** Styles applied to the Select component `icon` class. */
selectIcon?: string;
/** Styles applied to the InputBase component. */
/** Styles applied to the Select component `root` element. */
input?: string;
/** Styles applied to the MenuItem component. */
menuItem?: string;
Expand Down Expand Up @@ -135,6 +137,10 @@ export interface TablePaginationTypeMap<P, D extends React.ElementType> {
* @default false
*/
showLastButton?: boolean;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
};
defaultComponent: D;
}
Expand Down
Loading