0.1.0 • Published 4 years ago

xy-spin 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-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是否内联模式booleantrue
indicator自定义加载指示符React.ReactNode-
spinning是否加载中booleanfalse
size设置大小,可选值为 small large 或者不设stringdefault
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.