Skip to content

Commit

Permalink
group sharing message as gray text in story title
Browse files Browse the repository at this point in the history
  • Loading branch information
hj940709 committed Oct 7, 2024
1 parent da7db02 commit 3738e44
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions client/assets/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1622,6 +1622,7 @@ label.file-upload-btn {

@media (min-width: 640px) {
margin-left: 1rem;
margin-right: 1rem;

&:hover {
cursor: pointer;
Expand Down
17 changes: 15 additions & 2 deletions client/components/LibraryView/StoryListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const StoryTitle = ({
currentGroup,
libraryShown,
setConfirmationOpen,
storyGroupShareInfo,
handleControlledStoryCancel,
}) => {
const learningLanguage = useSelector(learningLanguageSelector)
Expand All @@ -38,14 +39,25 @@ const StoryTitle = ({
return (
<StoryDetailsModal
trigger={
<span className="space-between" style={{ overflow: 'hidden', width: '100%' }}>
<span className="flex" style={{ overflow: 'hidden', width: '100%' }}>
<Icon color="grey" name="ellipsis vertical" className="story-item-dots" />
<h5
className="story-item-title"
style={{ marginBottom: '.5rem', ...getTextStyle(learningLanguage) }}
style={{ marginBottom: '.5rem', width: '65%', ...getTextStyle(learningLanguage) }}
>
{story.title}
</h5>
{inGroupLibrary && storyGroupShareInfo && (
<span style={{
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
'-o-text-overflow': 'ellipsis',
width: '30%',
}}>
{storyGroupShareInfo.message}
</span>
)}
</span>
}
story={story}
Expand Down Expand Up @@ -368,6 +380,7 @@ const StoryListItem = ({ story, libraryShown, selectedGroup }) => {
inGroupLibrary={inGroupLibrary}
currentGroup={currentGroup}
libraryShown={libraryShown}
storyGroupShareInfo={storyGroupShareInfo}
handleControlledStoryCancel={handleControlledStoryCancel}
/>
</Card.Content>
Expand Down

0 comments on commit 3738e44

Please sign in to comment.