Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uiw/react-empty

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-empty

Empty component

  • 4.13.11
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
129
Maintainers
1
Weekly downloads
 
Created
Source

Empty 空状态

Open in unpkg NPM Downloads npm version

空状态时的展示占位图。新组件 v4.11.0+ 支持。

import { Empty } from 'uiw';
// or
import Empty from '@uiw/react-empty';

基本使用

import ReactDOM from 'react-dom';
import { Empty, Button } from 'uiw';

ReactDOM.render(<Empty />, _mount_);

自定义

通过自定义属性定制个性化展示。

import ReactDOM from 'react-dom';
import { Empty, Icon } from 'uiw';

const Demo = () => {
  return(
    <Empty
      description={
        <span>
          Customize <a href="#">Description</a>
        </span>
      }
      icon={<Icon type="shopping-cart"  style={{ fontSize: '39px' }} />}
    >
      <Button type="primary">新增数据</Button>
    </Empty>
  )
}

ReactDOM.render(<Demo />, _mount_);

无描述展示

import ReactDOM from 'react-dom';
import { Empty, Button } from 'uiw';

ReactDOM.render(<Empty description={false} />, _mount_);

Props

参数说明类型默认值
description自定义描述内容ReactNode暂无数据
icon可以替换内置图标ReactNode-
size内置 svg 图标:尺寸number | string-
iconProps内置 svg 图标:属性设置React.SVGProps<SVGSVGElement>-

Keywords

FAQs

Package last updated on 12 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc