Bug/name.overflow (#1025)

* creator name was pushing 'view only' off card

* Update MapCard.js
This commit is contained in:
Connor Turland 2017-01-11 13:36:07 -05:00 committed by GitHub
parent 25b4d388de
commit 0952c0f3c9
2 changed files with 11 additions and 1 deletions

View file

@ -211,6 +211,16 @@
span.creatorName {
margin-left: 8px;
max-width: 162px;
display: inline-block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
vertical-align: middle;
}
.creatorAndPerm.cardHasViewOnly span.creatorName {
max-width: 95px;
}
.cardViewOnly {

View file

@ -112,7 +112,7 @@ class MapCard extends Component {
{ mobile && hasConversation && <div className='mobileHasConversation'><MapperList mappers={ mapperList } /></div> }
{ mobile && d && <div className="desc">{ d }</div> }
{ mobile && <div className='mobileMetadata'><Metadata map={ map } /></div> }
<div className='creatorAndPerm'>
<div className={`creatorAndPerm ${map.authorizeToEdit(currentUser) ? '' : 'cardHasViewOnly'}`}>
<img className='creatorImage' src={ map.get('user_image') } />
<span className='creatorName'>{ map.get('user_name') }</span>
{ !map.authorizeToEdit(currentUser) && <div className='cardViewOnly'>View Only</div> }