0.1.3 • Published 3 years ago

@haoxuan8/react-spin v0.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

npm version npm dw

@haoxuan8/react-spin

demo

live demo

Install

npm install @haoxuan8/react-spin -S

Usage

import Spin from '@haoxuan8/react-spin'

render(
  <Spin spinning>
    <div>Content</div>
  </Spin>,
  document.querySelector('#root')
)

Static Method

  • Spin.setDefaultIndicator(indicator: ReactNode)
  • Spin.clearDefaultIndicator()

Props

NameTypeDefaultDescription
spinningBooleanfalseSpinning
indicatorReactNodeundefinedCustom icon when loading. Hide indicator if set indicator as null
opacityNumber0.5The opacity of content when loading
tipStringundefinedThe text below indicator
mainColorString#409effThe color of default indicator
fontColorString#409effThe color of tip
sizeNumber42The size(px) of default indicator
maxHeightNumber | none400Default maxHeight(px) of indicator container. Indicator will be placed in the center of that container. If you want to place indicator in the center of children, just set this attribute as none
0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago