# xy-spin

> 基于 React Hooks 的加载中组件

Latest version **0.1.0** (published 2019-11-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install xy-spin
pnpm add xy-spin
yarn add xy-spin
bun add xy-spin
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-11-19 |
| First published | 2019-05-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 13.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | XueYou |
| Maintainers | xueyou2000 |
| Keywords | react, react-component, xy-spin |

## Links

- npm: https://www.npmjs.com/package/xy-spin
- Repository: https://github.com/xueyou2000/xy-spin
- Homepage: https://github.com/xueyou2000/xy-spin#readme
- Issues: https://github.com/xueyou2000/xy-spin/issues
- npm.io page: https://npm.io/package/xy-spin

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^16.12.0
- [react-dom](https://npm.io/package/react-dom.md) ^16.12.0
- [classnames](https://npm.io/package/classnames.md) ^2.2.6

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2019-11-19
- 0.0.31 — 2019-09-04
- 0.0.3 — 2019-05-13
- 0.0.2 — 2019-05-05

## README

| ![IE](https://github.com/alrra/browser-logos/blob/master/src/edge/edge_48x48.png?raw=true) | ![Chrome](https://github.com/alrra/browser-logos/blob/master/src/chrome/chrome_48x48.png?raw=true) | ![Firefox](https://github.com/alrra/browser-logos/blob/master/src/firefox/firefox_48x48.png?raw=true) | ![Opera](https://github.com/alrra/browser-logos/blob/master/src/opera/opera_48x48.png?raw=true) | ![Safari](https://github.com/alrra/browser-logos/blob/master/src/safari/safari_48x48.png?raw=true) |
| ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| IE 10+ ✔                                                                                   | Chrome 31.0+ ✔                                                                                     | Firefox 31.0+ ✔                                                                                       | Opera 30.0+ ✔                                                                                   | Safari 7.0+ ✔                                                                                      |

![NPM version](http://img.shields.io/npm/v/xy-spin.svg?style=flat-square)
![node version](https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square)
![npm download](https://img.shields.io/npm/dm/xy-spin.svg?style=flat-square)

[![xy-spin](https://nodei.co/npm/xy-spin.png)](https://npmjs.org/package/xy-spin)

# xy-spin

基于`React Hooks` + `typescript`的基础组件

## 安装

```bash
# yarn
yarn add xy-spin
```

## 使用例子

```tsx
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 | -         |

## 开发

```sh
yarn run start
```

## 例子

http://localhost:6006

## 测试

```
yarn run test
```

## 开源许可

xy-spin is released under the MIT license.

---
_Source: https://npm.io/package/xy-spin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
