@temporg/ui-prop-types

99.10.0 • Public • Published

category: packages

ui-prop-types

npm  build-status  MIT License  Code of Conduct

A collection of custom prop type validators.

Functions

The ui-prop-types package contains the following:

Installation

yarn add @temporg/ui-prop-types

Usage

import React from 'react'
import PropTypes from 'prop-types'

import { Children, controllable } from '@temporg/ui-prop-types'

class MyComponent extends React.Component {
  static propTypes = {
    children: Children.oneOf([SomeOtherComponent, AnotherComponent])
    selected: controllable(PropTypes.bool, 'onSelect'),
    onSelect: PropTypes.func
  }
  ...
}

Readme

Keywords

none

Package Sidebar

Install

npm i @temporg/ui-prop-types

Weekly Downloads

1

Version

99.10.0

License

MIT

Unpacked Size

60.5 kB

Total Files

27

Last publish

Collaborators

  • npm