-
-
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
[docs] Align codebase a bit with conventions #55
Conversation
return ( | ||
<div className="grid-container"> | ||
<XGrid | ||
rows={rows} | ||
columns={columns} | ||
components={{ loadingOverlay: loadingComponent }} | ||
components={{ loadingOverlay: LoadingComponent }} |
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.
This makes me wonder, shouldn't we rename the key to a capital first letter to
- Communicate it's a component
- Allow the shorthand notation
?
components={{ loadingOverlay: LoadingComponent }} | |
components={{ LoadingOverlay }} |
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.
It's actually what 2 of the 3 prior arts I could find on mui/material-ui#21453 do.
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.
Yes we could as we replace our internal components with the user components
export const Loading = () => { | ||
const loadingComponent = () => ( | ||
<GridOverlay className={'custom-overlay'}> | ||
function LoadingComponent() { |
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.
function LoadingComponent() { | |
function LoadingOverlay() { |
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.
If we take this approach we have to do it for all the 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 didn't mean to apply the change here. This was meant for illustration purposes on the RFC :). I think that we should wait for the conclusion of the RFC, but yeah, then we enforce it everywhere.
2137834
to
6f5eab4
Compare
6f5eab4
to
346a1f6
Compare
@dtassone I have rebased the pull request to fix the conflicts. Please have a second look. A couple of problems I have noticed that I couldn't fix here:
|
|
A chunk of #6