Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1776 | Member orgs styles
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Oct 2, 2024
1 parent 95e1cab commit 49bc24f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/components/orgs/OrgChip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import BaseEntityChip from '../common/BaseEntityChip'
import OrgTooltip from './OrgTooltip'


const OrgChip = ({ org, noTooltip, ...rest }) => {
const OrgChip = ({ org, noTooltip, tooltipProps, ...rest }) => {
let _tooltipProps = tooltipProps || {}
return noTooltip ? (
<BaseEntityChip
entity={org}
icon={<OrganizationIcon />}
{...rest}
/>
) : (
<OrgTooltip org={org}>
<OrgTooltip org={org} {..._tooltipProps}>
<BaseEntityChip
entity={org}
icon={<OrganizationIcon />}
Expand Down
2 changes: 1 addition & 1 deletion src/components/orgs/OrgTooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const TooltipTitle = ({ org }) => {
<div style={{width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between'}}>
{
org?.logo_url ?
<img src={org.logo_url} style={{width: '48px', height: '48px', border-radius: '50%', objectFit: 'cover'}} /> :
<img src={org.logo_url} style={{width: '48px', height: '48px', borderRadius: '50%', objectFit: 'cover'}} /> :
<OrganizationIcon sx={{width: '30px', height: '30px'}} />
}
<FollowActionButton iconButton entity={org} sx={{mr: 0, ml: 1.5}} size='small' />
Expand Down
2 changes: 1 addition & 1 deletion src/components/users/UserProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const UserProfile = ({ user }) => {
<div className='col-xs-12 padding-0' style={{marginTop: '8px', maxHeight: '300px', overflow: 'auto'}}>
{
userOrgs.map(org => (
<OrgChip hideType key={org?.id} org={org} sx={{margin: '4px'}} />
<OrgChip hideType key={org?.id} org={org} sx={{margin: '4px'}} tooltipProps={{spanStyle: {display: 'inline'}}} />
))
}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/users/UserTooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const TooltipTitle = ({ user }) => {
<div style={{width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between'}}>
{
user?.logo_url ?
<img src={user.logo_url} style={{width: '48px', height: '48px', border-radius: '50%', objectFit: 'cover'}} /> :
<img src={user.logo_url} style={{width: '48px', height: '48px', borderRadius: '50%', objectFit: 'cover'}} /> :
<UserIcon sx={{width: '30px', height: '30px'}} />
}
<FollowActionButton iconButton entity={user} sx={{mr: 0, ml: 1.5}} size='small' />
Expand Down

0 comments on commit 49bc24f

Please sign in to comment.