How to use the @instructure/ui-prop-types.Children.enforceOrder function in @instructure/ui-prop-types

To help you get started, we’ve selected a few @instructure/ui-prop-types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github instructure / instructure-ui / packages / ui-overlays / src / Modal / index.js View on Github external
---
**/
@deprecated('7.0.0', null, 'Use @instructure/ui-modal instead')
@testable()
@themeable(theme, styles)
class Modal extends Component {
  static propTypes = {
    /**
     * An accessible label for the `` content
     */
    label: PropTypes.string.isRequired,

    /**
     * The children to be rendered within the ``
     */
    children: ChildrenPropTypes.enforceOrder(
      [ModalHeader, ModalBody, ModalFooter],
      [ModalHeader, ModalBody],
      [ModalBody, ModalFooter],
      [ModalBody]
    ),

    /*
     * The size of the `` content
     */
    size: PropTypes.oneOf(['auto', 'small', 'medium', 'large', 'fullscreen']),

    /**
    * Designates the background style of the ``
    */
    variant: PropTypes.oneOf(['default', 'inverse']),
github instructure / instructure-ui / packages / ui-modal / src / Modal / index.js View on Github external
category: components
---
**/
@testable()
@themeable(theme, styles)
class Modal extends Component {
  static propTypes = {
    /**
     * An accessible label for the `` content
     */
    label: PropTypes.string.isRequired,

    /**
     * The children to be rendered within the ``
     */
    children: ChildrenPropTypes.enforceOrder(
      [ModalHeader, ModalBody, ModalFooter],
      [ModalHeader, ModalBody],
      [ModalBody, ModalFooter],
      [ModalBody]
    ),

    /**
    * The element to render the dialog as, `span` by default
    */
    as: PropTypes.elementType,

    /*
     * The size of the `` content
     */
    size: PropTypes.oneOf(['auto', 'small', 'medium', 'large', 'fullscreen']),