How to use the bpk-react-utils.deprecated function in bpk-react-utils

To help you get started, we’ve selected a few bpk-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 Skyscanner / backpack / native / packages / react-native-bpk-component-text / src / common-types.js View on Github external
WEIGHT_STYLES.emphasized
      }" instead.`,
    );
  }

  PropTypes.oneOf(Object.keys(WEIGHT_STYLES))(
    props,
    propName,
    componentName,
    ...rest,
  );
};

export const propTypes = {
  children: PropTypes.node.isRequired,
  emphasize: deprecated(PropTypes.bool, 'Use "weight" instead.'),
  style: stylePropType,
  textStyle: PropTypes.oneOf(TEXT_STYLES),
  weight: weightPropType,
};

export const defaultProps = {
  emphasize: null,
  style: null,
  textStyle: 'base',
  weight: WEIGHT_STYLES.regular,
};

bpk-react-utils

Utilities for Backpack's React components.

Apache-2.0
Latest version published 2 years ago

Package Health Score

73 / 100
Full package analysis

Similar packages