File size: 3,134 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
// @flow
import theme from 'shared/theme';
import styled, { css } from 'styled-components';
import { Link } from 'react-router-dom';
import { zIndex } from 'src/components/globals';
export const InboxThreadItem = styled.div`
display: flex;
flex-direction: column;
max-width: 100%;
min-width: 0;
overflow-x: hidden;
border-bottom: 1px solid
${props => (props.active ? props.theme.brand.alt : props.theme.bg.divider)};
background: ${props =>
props.active ? props.theme.brand.alt : props.theme.bg.default};
position: relative;
padding: 12px 20px 12px 12px;
&:hover {
background: ${props =>
props.active ? props.theme.brand.alt : props.theme.bg.wash};
}
&:last-of-type {
border-bottom: 1px solid
${props =>
props.active ? props.theme.brand.alt : props.theme.bg.divider};
}
`;
export const InboxLinkWrapper = styled(Link)`
position: absolute;
display: inline-block;
height: 100%;
width: 100%;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: ${zIndex.card};
&:hover {
cursor: pointer;
}
`;
export const InboxThreadContent = styled.div`
display: flex;
flex-direction: row;
justify-content: flex-start;
align-self: stretch;
position: relative;
z-index: ${zIndex.card + 1};
align-items: flex-start;
pointer-events: none;
`;
export const Column = styled.div`
display: flex;
flex-direction: column;
flex: 1 1 auto;
align-items: flex-start;
`;
export const ThreadTitle = styled.h3`
font-size: 15px;
font-weight: 600;
color: ${props =>
props.active ? props.theme.text.reverse : props.theme.text.default};
max-width: 100%;
line-height: 1.4;
`;
export const ThreadSnippet = styled.h4`
font-size: 15px;
font-weight: 400;
color: ${props =>
props.active ? props.theme.text.reverse : props.theme.text.default};
max-width: 100%;
line-height: 1.4;
margin-top: 4px;
word-break: break-word;
white-space: pre-line;
`;
export const ThreadActivityWrapper = styled.div`
display: flex;
margin-top: 8px;
align-items: center;
pointer-events: none;
.icon {
&:hover {
cursor: pointer;
}
}
`;
export const ThreadStatusWrapper = styled(ThreadActivityWrapper)`
flex: auto;
justify-content: flex-start;
color: ${props =>
props.active ? props.theme.text.reverse : props.theme.text.alt};
.icon {
pointer-events: auto;
&:hover {
cursor: pointer;
}
}
`;
export const CountWrapper = styled.div`
display: flex;
flex: none;
font-size: 13px;
pointer-events: none;
color: ${props =>
props.active ? props.theme.text.reverse : props.theme.text.alt};
font-weight: 500;
align-items: center;
.icon {
margin-right: 4px;
}
a {
font-weight: 600;
}
a:hover {
color: ${theme.text.default};
}
`;
const avatarLinkStyles = css`
display: flex;
flex: 1 0 auto;
margin-right: 12px;
margin-top: 4px;
pointer-events: auto;
max-width: 40px;
`;
export const AvatarLink = styled.div`
${avatarLinkStyles} border-radius: 32px;
`;
export const CommunityAvatarLink = styled.div`
${avatarLinkStyles} border-radius: 4px;
`;
|