Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Latest commit

 

History

History
17 lines (12 loc) · 371 Bytes

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