2 changed files with 0 additions and 72 deletions
@ -1,31 +0,0 @@ |
|||
import React from 'react'; |
|||
import moment from 'moment'; |
|||
import marked from 'marked'; |
|||
import { Avatar } from 'antd'; |
|||
|
|||
import styles from './index.less'; |
|||
|
|||
/* eslint react/no-danger:0 */ |
|||
export default ({ data: { user, updatedAt, action } }) => ( |
|||
<div |
|||
className={styles.activitiesItem} |
|||
> |
|||
<div className={styles.avatar}> |
|||
{ |
|||
user.link && <a href={user.link} target="_blank"> |
|||
<Avatar src={user.avatar} /> |
|||
</a> |
|||
} |
|||
{ |
|||
!user.link && <img src={user.avatar} alt={user.title} /> |
|||
} |
|||
</div> |
|||
<div className={styles.content}> |
|||
<div> |
|||
<span className={styles.name}>{user.name}</span> |
|||
<div dangerouslySetInnerHTML={{ __html: marked(action) }} /> |
|||
</div> |
|||
<p>{moment(updatedAt).fromNow()}</p> |
|||
</div> |
|||
</div> |
|||
); |
|||
@ -1,41 +0,0 @@ |
|||
@import "~antd/lib/style/themes/default.less"; |
|||
|
|||
.activitiesItem { |
|||
padding: 24px 24px 0 24px; |
|||
position: relative; |
|||
|
|||
.avatar { |
|||
position: absolute; |
|||
top: 24px; |
|||
left: 24px; |
|||
img { |
|||
display: block; |
|||
border-radius: 32px; |
|||
width: 32px; |
|||
height: 32px; |
|||
} |
|||
} |
|||
.content { |
|||
border-bottom: 1px solid @border-color-split; |
|||
padding-left: 48px; |
|||
padding-bottom: 24px; |
|||
font-size: @font-size-base; |
|||
a { |
|||
color: @primary-color; |
|||
} |
|||
& > div { |
|||
line-height: 22px; |
|||
.name { |
|||
margin-right: 4px; |
|||
font-weight: 500; |
|||
} |
|||
div, p { |
|||
display: inline-block; |
|||
} |
|||
} |
|||
& > p { |
|||
margin-top: 4px; |
|||
line-height: 22px; |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue