@aximario/react-loading

react component loading

Usage no npm install needed!

<script type="module">
  import aximarioReactLoading from 'https://cdn.skypack.dev/@aximario/react-loading';
</script>

README

react-loading

JavaScript Style Guide

Loading 组件

安装

npm i @aximario/react-loading -S

API

属性 描述 类型 默认值
type loading 类型 string default
size loading 大小 string 24px
color loading 颜色 string #000
className classname string -
style style CSSProperties {}

className 和 style 设置的颜色无效,只有 color 属性能控制颜色

type

loading 目前有 4 种类型

| 值 | 示例 | | -- | ---- | | default | | | dotFade | | | dotWave | | | spin | |

使用

// 默认
<Loading />

// 修改各种属性
<Loading
  type="dotFade"
  size="30px"
  color="#888"
  className="loading"
  style={{ marginLeft: '10px' }}
/>