0.1.0 • Published 4 years ago

xy-card v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago
IEChromeFirefoxOperaSafari
IE 10+ ✔Chrome 31.0+ ✔Firefox 31.0+ ✔Opera 30.0+ ✔Safari 7.0+ ✔

NPM version node version npm download

xy-card

xy-card

卡片组件

安装

# yarn
yarn add xy-card xy-skeleton xy-grid utils-hooks xy-grid classnames

使用例子

import React from "react";
import ReactDOM from "react-dom";
import { Card, CardMeta } from "xy-card";
ReactDOM.render(
    <Card title="卡片标题">
        <CardMeta title="Europe Street beat">www.instagram.com</CardMeta>
    </Card>,
    container
);

API

Card

属性说明类型默认值
children卡片内容React.ReactNode-
actions卡片操作按钮, 在卡片底部的操作按钮集合React.ReactNode[]-
bordered是否有边框booleantrue
cover卡片封面React.ReactNode-
loading是否加载中booleanfalse
title卡片标题React.ReactNode-
type卡片类型, 可用值"inner"或不设string-
hoverable鼠标移入悬浮booleanfalse
bodyStyle卡片内容样式React.CSSProperties

CardMeta

属性说明类型默认值
avatar头像React.ReactNode-
children描述内容React.ReactNode-
title标题React.ReactNode-

开发

yarn run start

例子

http://localhost:6006

测试

yarn run test

开源许可

xy-card is released under the MIT license.