xy-spin
v0.1.0
Published
基于 React Hooks 的加载中组件
Downloads
11
Maintainers
Readme
|
|
|
|
|
|
| ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| IE 10+ ✔ | Chrome 31.0+ ✔ | Firefox 31.0+ ✔ | Opera 30.0+ ✔ | Safari 7.0+ ✔ |
xy-spin
基于React Hooks + typescript的基础组件
安装
# yarn
yarn add xy-spin使用例子
import React from "react";
import ReactDOM from "react-dom";
import Spin from "xy-spin";
ReactDOM.render(<Spin spinning={true} />, container);API
| 属性 | 说明 | 类型 | 默认值 |
| --------- | ------------------------------------------------------------------ | --------------- | --------- |
| children | 包裹内容 | React.ReactNode | - |
| inline | 是否内联模式 | boolean | true |
| indicator | 自定义加载指示符 | React.ReactNode | - |
| spinning | 是否加载中 | boolean | false |
| size | 设置大小,可选值为 small large 或者不设 | string | default |
| type | 设置按钮类型,可选值为 primary dashed text danger 或者不设 | string | - |
| tips | 自定义描述 | React.ReactNode | - |
开发
yarn run start例子
http://localhost:6006
测试
yarn run test开源许可
xy-spin is released under the MIT license.

