-
Notifications
You must be signed in to change notification settings - Fork 305
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
feat(unified-share-modal): add custom avatars click handler #3688
Conversation
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.
some nits
/** A custom action to be invoked instead of default behavior when collaborators avatars are clicked */ | ||
handleCollaboratorAvatarsClick?: () => void, |
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.
nit: this list of sorted alphabetically
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.
Nice catch, adjusted
@@ -371,6 +371,8 @@ type BaseUnifiedShareProps = CollaboratorAvatarsTypes & | |||
|
|||
// Prop types for the Unified Share Modal | |||
export type USMProps = BaseUnifiedShareProps & { | |||
/** A custom action to be invoked instead of default behavior when collaborators avatars are clicked */ | |||
handleCollaboratorAvatarsClick?: () => void, |
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.
nit: for the prop names of callback functions, we usually use the "on" prefix. "handle" would be used instead when we're defining a function/method
e.g. onCollaboratorListClick
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.
Thanks for the suggestion, adjusted
83649c6
to
0be4f58
Compare
0be4f58
to
af4560e
Compare
af4560e
to
30e2f1a
Compare
@tjuanitas I don't know why Chromatic fails. Those are not my changes |
This PR adds a handler to USM that if defined will trigger alternate, custom action upon clicking avatars