xy-spin

基于 React Hooks 的加载中组件


Keywords
react, react-component, xy-spin
License
MIT
Install
npm install xy-spin@0.1.0

Documentation

IE Chrome Firefox Opera Safari
IE 10+ ✔ Chrome 31.0+ ✔ Firefox 31.0+ ✔ Opera 30.0+ ✔ Safari 7.0+ ✔

NPM version node version npm download

xy-spin

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.