1.1.2 • Published 3 years ago
perso-feed-widget v1.1.2
Feed widget
This widget is used to present insights and trackers to a client, in both a feed mode and a integrated mode.
Installation
Use npm to install the library dependencies
npm install
Usage
Adding it to your project
import PersoFeedWidget from 'perso-feed-widget';
function App() {
return (
<PersoFeedWidget {...props} />
);
}
Bundling changes while in development mode (optional):
npm run build:watch
Props
Name | Description | Type | Required |
---|---|---|---|
mode | Which mode the component should render | 'FEED_MODE' | 'INTEGRATED_MODE' | ☑ |
menuProps | Render props to pass to Menu component | Object | ☑ |
menuProps.isOpen | True if the menu is open | Boolean | ☑ |
menuProps.handleSetMode | Function that handles the mode change | Function | ☑ |
menuProps.handleSetIsOpen | Function that handles the opening and closing of the menu | Function | ☑ |
Publishing:
- Alter your
package.json
's version (Refer to semantic versioning) - Run
npm login
command to log into the registry. - Run
npm publish
command