0.0.13 • Published 3 years ago

@bondli/mini-ui v0.0.13

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

@bondli/mini-ui

Install

$ npm install @bondli/mini-ui --save

Usage

import { createElement } from 'rax';

import { StatusPage, Loading } from '@bondli/mini-ui';

import './index.css';

export default function Home() {
  return (
    <>
      <Loading />
      <StatusPage type="error" needRetry={true} />
    </>
  );
}

Component List

Loading

加载中组件

Props

nametypedefaultdescribe
showSpinnerBealoonfalse是否显示加载中组件
loadingPicStringnull提示加载中的图标
loadingTextStringnull提示加载中的文案

Example

import { createElement } from 'rax';
import { Loading } from '@bondli/mini-ui';

export default function Home() {
  return (
    <>
      <Loading showSpinner={true} />
    </>
  );
}

StatusPage

状态页,支持三种情况:loading, empty, error

Props

nametypedefaultdescribe
typeStringempty页面类型,empty: 无数据,空页面;error: 出错了的页面;
needRetryBealoonfalse是否显示重试按钮
retryFunctionnull点击重试的回调函数
picStringnull显示的图标
titleStringnull提示文案主信息
textStringnull提示文案的详细信息

Example

import { createElement } from 'rax';
import { StatusPage } from '@bondli/mini-ui';

export default function Home() {
  return (
    <>
      <StatusPage type="empty" needRetry={true} />
    </>
  );
}
0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago