ant-design/components/card/demo/meta.md
afc163 827225b895
chore: replace demo image to public avatar resources (#32479)
* docs: replace avatar image to joeschmoe placeholder

* docs: usage randomme avatar url
2021-10-14 12:09:07 +08:00

933 B

order title
9
zh-CN en-US
支持更多内容配置 Support more content configuration

zh-CN

一种支持封面、头像、标题和描述信息的卡片。

en-US

A Card that supports cover, avatar, title and description.

import { Card, Avatar } from 'antd';
import { EditOutlined, EllipsisOutlined, SettingOutlined } from '@ant-design/icons';

const { Meta } = Card;

ReactDOM.render(
  <Card
    style={{ width: 300 }}
    cover={
      <img
        alt="example"
        src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
      />
    }
    actions={[
      <SettingOutlined key="setting" />,
      <EditOutlined key="edit" />,
      <EllipsisOutlined key="ellipsis" />,
    ]}
  >
    <Meta
      avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
      title="Card title"
      description="This is the description"
    />
  </Card>,
  mountNode,
);