xy-skeleton
v0.1.0
Published
基于React的骨架屏组件
Downloads
81
Maintainers
Readme
| | | | | | | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | IE 10+ ✔ | Chrome 31.0+ ✔ | Firefox 31.0+ ✔ | Opera 30.0+ ✔ | Safari 7.0+ ✔ |
xy-skeleton
骨架屏组件, 用于加载等待
安装
# yarn
yarn add xy-skeleton
使用例子
import React from "react";
import ReactDOM from "react-dom";
import Skeleton from "xy-skeleton";
ReactDOM.render(
<Skeleton loading={true}>
<p>加载完毕</p>
</Skeleton>,
container,
);
API
| 属性 | 说明 | 类型 | 默认值 | | -------- | ---------------- | --------------- | ------ | | loading | 是否显示加载状态 | boolean | 无 | | rows | 显示多少行骨架 | number | 无 | | children | 包裹内容 | React.ReactNode | 无 |
开发
yarn run start
例子
http://localhost:6006
测试
yarn run test
开源许可
xy-skeleton is released under the MIT license.