-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
[account] Export AccountUserDetails
component
#4227
base: master
Are you sure you want to change the base?
Conversation
…into enh/account-3
…into enh/account-3
userDetailsContainer
slotAccountUserDetails
component
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 great!
Other than what I added in #4181 just added some opinions on naming and docs feedback.
slotProps={{ | ||
userDetailsContainer: { |
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.
What about calling it just userDetails
?
}), | ||
slots: PropTypes.shape({ | ||
menuItems: PropTypes.elementType, | ||
content: PropTypes.elementType, |
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.
Maybe the name content
is too generic? But it's just my opinion, I don't mind it.
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
padding: theme.spacing(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.
Is using a simple 2
here not the same thing? (not sure though)
By passing a custom component to the `userDetailsContainer` slot, you can override the section which displays the signed-in user's details. The custom component receives a `session` prop which contains the current authentication session: | ||
|
||
```tsx | ||
// ... |
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 example doesn't immediately make sense to me: where is the CustomSession
being used?
AccountUserDetails
component AccountUserDetails
component
<Account/>
#4226To Do
useSession()
hook for user to be able to extend it