Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

decorate-component-with-props

belle-ui110.8kMIT1.2.1

Utility function for decorating a React component with any props

readme

A simple function to decorate your component with miscellaneous props:

Example:

import decorateComponentWithProps from 'decorate-component-with-props';

const props = {
  wine: 'red',
  beer: 'ipa',
  food: 'spaghetti',
};

MyDecoratedComponent = decorateComponentWithProps(MyComponent, props);

// MyDecoratedComponent will now be decorated with these props