mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-14 11:10:29 +03:00
added read receipt support
This commit is contained in:
parent
8d4e796f42
commit
683ce431db
4 changed files with 17 additions and 4 deletions
|
|
@ -14,7 +14,7 @@ import InviteCancelArraowIC from '../../../../public/res/ic/outlined/invite-canc
|
|||
import UserIC from '../../../../public/res/ic/outlined/user.svg';
|
||||
import TickMarkIC from '../../../../public/res/ic/outlined/tick-mark.svg';
|
||||
|
||||
function TimelineChange({ variant, content, time }) {
|
||||
function TimelineChange({ variant, content, time, onClick }) {
|
||||
let iconSrc;
|
||||
|
||||
switch (variant) {
|
||||
|
|
@ -42,7 +42,7 @@ function TimelineChange({ variant, content, time }) {
|
|||
}
|
||||
|
||||
return (
|
||||
<div className="timeline-change">
|
||||
<button style={{ cursor: onClick === null ? 'default' : 'pointer' }} onClick={onClick} type="button" className="timeline-change">
|
||||
<div className="timeline-change__avatar-container">
|
||||
<RawIcon src={iconSrc} size="extra-small" />
|
||||
</div>
|
||||
|
|
@ -55,12 +55,13 @@ function TimelineChange({ variant, content, time }) {
|
|||
<div className="timeline-change__time">
|
||||
<Text variant="b3">{time}</Text>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
TimelineChange.defaultProps = {
|
||||
variant: 'other',
|
||||
onClick: null,
|
||||
};
|
||||
|
||||
TimelineChange.propTypes = {
|
||||
|
|
@ -74,6 +75,7 @@ TimelineChange.propTypes = {
|
|||
PropTypes.node,
|
||||
]).isRequired,
|
||||
time: PropTypes.string.isRequired,
|
||||
onClick: PropTypes.func,
|
||||
};
|
||||
|
||||
export default TimelineChange;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
padding-right: var(--sp-extra-tight);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--bg-surface-hover);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue