-
Notifications
You must be signed in to change notification settings - Fork 2.9k
adding an optional control property to the Persona control #215
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
Changes from 10 commits
99cfc93
97b3614
1429b46
80688df
d075473
e66c6c0
3961871
672fc58
e528947
904b62c
aad2691
9f29593
a3e48fe
969aace
50d8142
97e0884
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,8 @@ export class Persona extends React.Component<IPersonaProps, any> { | |
| }; | ||
|
|
||
| public render() { | ||
| let { className, size, imageUrl, imageInitials, initialsColor, presence, primaryText, secondaryText, tertiaryText, optionalText, hidePersonaDetails } = this.props; | ||
| let { className, size, imageUrl, imageInitials, initialsColor, presence, primaryText, secondaryText, tertiaryText, optionalText, hidePersonaDetails, innerControl } = this.props; | ||
| let personaDetailsClass = innerControl ? 'ms-Persona-detailsWithInnerControl' : 'ms-Persona-details'; | ||
|
|
||
| return ( | ||
| <div { ... this.props as any } className={ css('ms-Persona', className, PERSONA_SIZE[size], PERSONA_PRESENCE[presence]) }> | ||
|
|
@@ -35,17 +36,19 @@ export class Persona extends React.Component<IPersonaProps, any> { | |
| ) } | ||
|
|
||
| { presence !== PersonaPresence.none && <div className='ms-Persona-presence'></div> } | ||
|
|
||
| { !hidePersonaDetails && ( | ||
| <div className='ms-Persona-details'> | ||
| <div className= { personaDetailsClass }> | ||
| <div className='ms-Persona-primaryText'>{ primaryText }</div> | ||
| { secondaryText ? ( | ||
| <div className='ms-Persona-secondaryText'>{ secondaryText }</div> | ||
| ) : (null) } | ||
| <div className='ms-Persona-tertiaryText'>{ tertiaryText }</div> | ||
| <div className='ms-Persona-optionalText'>{ optionalText }</div> | ||
| </div>) } | ||
| </div> | ||
| { innerControl ? ( | ||
|
||
| <div className='ms-Persona-detailsWithInnerControl'>{ innerControl }</div> | ||
|
||
| ) : (null) } | ||
| </div>) } | ||
| </div> | ||
| ); | ||
| } | ||
| } | ||
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.
delete this.