New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

antd-extensions

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antd-extensions

[![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coverage-image]][coverage-url] ![][david-url] ![][dt-url] ![][license-url]

  • 1.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-45.45%
Maintainers
1
Weekly downloads
 
Created
Source

antd-extensions

NPM Version Build Status Coverage Status

Test

npm test

采用Jest + Enzyme进行单元测试

目前单元测试还在补充,望有志之士一起加入。 单测在组件目录下的tests中,写单测时请尽量保证覆盖率 > 95% 并考虑边界情况,如果不能做到测试用例全覆盖,优先覆盖底层逻辑。

Install

npm install --save antd-extensions

ant-design的 DFocus 扩展组件库,帮助开发者选择需要的组件,并迅速进入角色。

完整 API 使用文档,请这边走

Usage

// 日期区间选择器
import React, { Component } from 'react'
import { TimeRangePicker } from 'antd-extensions'

class Example extends Component {
  constructor(props) {
    super(props)

    this.state = {
      value: {
        type: 'CUSTOMIZE',
        ranges: [1533081600000, 1534377600000]
      }
    }
  }

  _handleChange = value => {
    console.log(`You're selection is ${JSON.stringify(value)}`)
    this.setState({
      value
    })
  }

  render() {
    return (
      <TimeRangePicker
        value={this.state.value}
        onChange={this._handleChange}
        labels={{
          BTN_ALL: 'All',
          BTN_LAST_WEEK: 'Last week',
          BTN_LAST_MONTH: 'Last month',
          BTN_CUSTOMIZE: 'Customize',
          PLACEHOLDER_START: 'Start',
          PLACEHOLDER_END: 'End'
        }}
        disabledDate={current =>
          current &&
          current >
            moment()
              .endOf('day')
              .subtract(1, 'days')
        }
      />
    )
  }
}

LICENSE

MIT License

FAQs

Package last updated on 16 Oct 2019

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