@instructure/ui-prop-types
v10.10.0
Published
A UI component library made by Instructure Inc.
Downloads
69,042
Maintainers
Keywords
Readme
category: packages
ui-prop-types
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
}
...
}