Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 371 Bytes

readme.md

File metadata and controls

17 lines (12 loc) · 371 Bytes

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