JSPM

@instructure/ui-prop-types

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

A UI component library made by Instructure Inc.

Package Exports

  • @instructure/ui-prop-types
  • @instructure/ui-prop-types/es/index.js
  • @instructure/ui-prop-types/lib/Children
  • @instructure/ui-prop-types/lib/Children.js
  • @instructure/ui-prop-types/lib/childrenOrValue
  • @instructure/ui-prop-types/lib/childrenOrValue.js
  • @instructure/ui-prop-types/lib/controllable
  • @instructure/ui-prop-types/lib/controllable.js
  • @instructure/ui-prop-types/lib/cursor
  • @instructure/ui-prop-types/lib/cursor.js
  • @instructure/ui-prop-types/lib/element
  • @instructure/ui-prop-types/lib/element.js
  • @instructure/ui-prop-types/lib/index.js
  • @instructure/ui-prop-types/lib/makeRequirable
  • @instructure/ui-prop-types/lib/makeRequirable.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@instructure/ui-prop-types) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme


category: packages

ui-prop-types

npm  MIT License  Code of Conduct

A collection of custom prop type validators.

Functions

The ui-prop-types package contains the following:

Installation

npm install @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
  }
  ...
}