Skip to content
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

Fix WV-515 invite friends Styling [Team Review] #4062

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@ const ChallengeInviteeListItem = ({ invitee }) => {
const { sx, children } = speakerDisplayNameToInitials(invitee.invitee_name);
return (
<InvitedFriendDetails>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<PrimaryDetails>
<FriendName>
<Avatar sx={{ ...sx, width: 35, height: 35, fontSize: '1rem' }}>{children}</Avatar>
<AvatarDetails sx={sx}>{children}</AvatarDetails>
{' '}
<span>{invitee.invitee_name}</span>
<Name>{invitee.invitee_name}</Name>
</FriendName>
<MessageStatus>
{invitee.messageStatus === 'Message Viewed' && <RemoveRedEye style={{ color: '#008000' }} />}
{invitee.messageStatus === 'Message Viewed' && <RemoveRedEye />}
{invitee.messageStatus === 'Message Sent' && <Check />}
{invitee.messageStatus === 'Challenge Joined' && <CheckCircle style={{ color: '#008000' }} />}
{invitee.messageStatus === 'Challenge Joined' && <CheckCircle />}
{' '}
{invitee.messageStatus}
</MessageStatus>
<VerticalLine />
<ActivityCommentEditWrapper>
<MoreHoriz />
</ActivityCommentEditWrapper>
</div>
</PrimaryDetails>
<Options>
<div>
{invitee.invite_sent === false && (
Expand All @@ -38,14 +38,15 @@ const ChallengeInviteeListItem = ({ invitee }) => {
)}
</div>
{invitee.messageStatus !== 'Challenge Joined' && (
<div style={{ padding: '5px' }}>
<Invite>
Invite Again
</div>
</Invite>
)}
</Options>
</InvitedFriendDetails>
);
};

ChallengeInviteeListItem.propTypes = {
invitee: PropTypes.object,
};
Expand All @@ -55,28 +56,40 @@ const InvitedFriendDetails = styled.div`
flex-direction: column;
justify-content: space-between;
gap: 10px;
padding: 15px 20px;
padding: 15px 2px;
border-bottom: 1px solid ${DesignTokenColors.neutral100};
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
`;

const PrimaryDetails = styled.div`
display: flex;
justify-content: space-between;
align-items: center;
`;

const FriendName = styled.div`
display: flex;
align-items: center;
gap: 10px;
flex: 1;
margin-left: 10px;
span {
font-weight: bold;
color: ${DesignTokenColors.neutral900};
}
`;

const AvatarDetails = styled(Avatar)`
width: 35px;
height: 35px;
font-size: 1rem;
`;

const Name = styled.div`
font-weight: bold;
color: ${DesignTokenColors.neutral900};
`;

const MessageStatus = styled.div`
width: 200px;
width: 170px;
text-align: center;
font-size: 14px;
color: ${DesignTokenColors.greenUI500};
color: ${DesignTokenColors.confirmation800};
`;

const VerticalLine = styled.div`
Expand All @@ -86,7 +99,7 @@ const VerticalLine = styled.div`
`;

const ActivityCommentEditWrapper = styled('div')`
margin-left: 10px;
margin-right: 10px;
`;

const Options = styled.div`
Expand All @@ -104,4 +117,8 @@ const InformationtoWevote = styled.div`
font-size: 15px;;
`;

const Invite = styled.div`
padding: 5px;
`;

export default ChallengeInviteeListItem;
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const ChallengeInviteeListRoot = ({ challengeWeVoteId, classes }) => {
return (
<ChallengeInviteeListRootContainer>
<Heading>
<p style={{ fontWeight: 'bold', padding: '10px' }}>Invited Friends</p>
<StyledP>Invited Friends</StyledP>
</Heading>
<ChallengeInviteeList
challengeWeVoteId={challengeWeVoteId}
Expand Down Expand Up @@ -70,13 +70,18 @@ const styles = () => ({
});

const ChallengeInviteeListRootContainer = styled.div`
max-width: 110vw;
max-width: 100vw;
margin: 0 auto;
`;

const Heading = styled.div`
padding: 0 16px;
padding: 0 5px;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
`;

const StyledP = styled.p`
font-weight: bold;
padding: 10px;
`;

export default withStyles(styles)(ChallengeInviteeListRoot);
Loading