card.js
1.48 KB
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
import React from 'react'
import { Card, Icon } from 'antd';
const { Meta } = Card;
function CardComponent(props) {
console.log("props" ,props)
return (
<Card
style={{ width: 300 }}
cover={
<img
alt={props.cardInfo.description}
src={props.cardInfo.image} />
}
actions={[
<a target="_blank" rel="noopener noreferrer" href={props.cardInfo.link}>
<Icon type="ellipsis" key="ellipsis" />
</a>
]}
>
<Meta
title={props.cardInfo.title}
description={props.cardInfo.description}
/>
</Card>
)
}
/*
function CardComponent(props) {
return (
<Card
style={{ width: 300 }}
cover={
<img
alt={props.cardInfo.fields.description.stringValue}
src={props.cardInfo.fields.image.stringValue} />
}
actions={[
<a target="_blank" rel="noopener noreferrer" href={props.cardInfo.fields.link.stringValue}>
<Icon type="ellipsis" key="ellipsis" />
</a>
]}
>
<Meta
title={props.cardInfo.fields.title.stringValue}
description={props.cardInfo.fields.description.stringValue}
/>
</Card>
)
}
*/
export default CardComponent