How to use the @instructure/ui-react-utils.deprecated.deprecatePropValues function in @instructure/ui-react-utils

To help you get started, we’ve selected a few @instructure/ui-react-utils 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-view / src / View / index.js View on Github external
'warning',
      'alert',
      'danger',
      'default',
      'inverse'
    ]), ['default', 'inverse'], ({ propName, propValue }) => (
      `In version 8.0.0, the value '${propValue}' for \`${propName}\` will be changed to ${(() => {
         if (propValue === 'default') return `'primary'`
         if (propValue === 'inverse') return `'transparent'`
      })()}. Use that value instead.`
    )),

    /**
    * Designates the background style of the `
github instructure / instructure-ui / packages / ui-text / src / Text / index.js View on Github external
category: components
---
**/

@themeable(theme, styles)
class Text extends Component {
  static propTypes = {
    /**
    * the element type to render as
    */
    as: PropTypes.elementType,
    children: PropTypes.node,
    /**
    * One of: primary, secondary, brand, success, warning, danger, alert, primary-inverse, secondary-inverse
    */
    color: deprecated.deprecatePropValues(PropTypes.oneOf([
      'primary',
      'secondary',
      'brand',
      'success',
      'warning',
      'error',
      'danger',
      'alert',
      'primary-inverse',
      'secondary-inverse'
    ]),
    ['error'], 'It will be removed in version 8.0.0. Use `danger` instead.'),
    elementRef: PropTypes.func,
    fontStyle: PropTypes.oneOf([
      'italic',
      'normal'
github instructure / instructure-ui / packages / ui-view / src / View / index.js View on Github external
/**
    * Accepts the familiar CSS shorthand to designate border widths corresponding
    * to edges
    */
    borderWidth: ThemeablePropTypes.borderWidth,

    /**
    * Accepts `small`, `medium`, `large`, `circle`, and `pill`. Border radius can be
    * assigned to individual corners in CSS shorthand style (e.g., `"medium large none pill"`).
    */
    borderRadius: ThemeablePropTypes.borderRadius,

    /**
    * Sets the color of the View border
    */
    borderColor: deprecated.deprecatePropValues(PropTypes.oneOf([
      'transparent',
      'primary',
      'secondary',
      'brand',
      'info',
      'success',
      'warning',
      'alert',
      'danger',
      'default',
      'inverse'
    ]), ['default', 'inverse'], ({ propName, propValue }) => (
      `In version 8.0.0, the value '${propValue}' for \`${propName}\` will be changed to ${(() => {
         if (propValue === 'default') return `'primary'`
         if (propValue === 'inverse') return `'transparent'`
      })()}. Use that value instead.`