JSPM

@instructure/ui-prop-types

7.3.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12761
  • Score
    100M100P100Q142375F
  • License MIT

A UI component library made by Instructure Inc.

Package Exports

  • @instructure/ui-prop-types

Readme


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 @instructure/ui-prop-types

Usage

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

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

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