-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
[DataGrid] Fix CSS footer spacing #268
[DataGrid] Fix CSS footer spacing #268
Conversation
@@ -1,5 +1,5 @@ | |||
import * as React from 'react'; | |||
import { ColDef, XGrid, GridOverlay, Footer, useApiRef, ApiRef } from '@material-ui/x-grid'; | |||
import { ColDef, XGrid, GridOverlay, GridFooter, useApiRef, ApiRef } from '@material-ui/x-grid'; |
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.
Prefix public components with Grid
, as we will re-export them from @material-ui/x
later on, avoid conflicts.
@@ -195,7 +195,7 @@ export const useStyles = makeStyles( | |||
alignItems: 'center', | |||
...theme.typography.body2, | |||
display: 'none', | |||
paddingLeft: theme.spacing(2), | |||
margin: theme.spacing(0, 2), |
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.
The fix, the rest is refactorization.
ea5410f
to
534d315
Compare
export function GridOverlay(props: DivProps) { | ||
type GridOverlayProps = React.HTMLAttributes<HTMLDivElement>; | ||
|
||
export function GridOverlay(props: GridOverlayProps) { |
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.
One this component, it seems that we can kill the <div className="MuiDataGrid-overlayContent" />
element. It will make customization easier. I will look closer at the issue later.
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.
Not sure, it's used in creating the no row message and error-message, and potentially more components.
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'm saying that because I didn't see something in the CSS that would prevent. We will see, I could be wrong. It needs to be done in an isolated pull request anyway.
Fix margin on:
Also work a bit on #6.