0.0.2 • Published 3 years ago

@ahwui/react-card v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

react card

基础的卡片容器。

安装

npm install --save @ahwui/react-card

引入

import Card from '@ahwui/react-card';

基本用法

import ReactDOM from 'react-dom';
import Card from '@ahwui/react-card';

ReactDOM.render(
  <div>
    <Card
      title="我是标题"
      extra={<a>More<a/>}
      cover={<img src="http://img.netcoc.com/system/0/233/881_1593580363_9.jpg" />}
      isHover
      style={{width: '300px'}}
    >
      我是内容
    </Card>
  </div>,
  _mount_
);

Props

参数说明类型默认值
title标题String--
extra卡片右上角的区域React.ReactNode--
cover卡片模块React.ReactNode--
coverStyle卡片模块自定义样式React.CSSProperties--
isHover鼠标移过时可浮起Booleanfalse