decorate-component-with-props

1.2.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i decorate-component-with-props

Weekly Downloads

37,475

Version

1.2.1

License

MIT

Unpacked Size

5.07 kB

Total Files

9

Last publish

Collaborators

  • nikgraf
  • juliankrispel