@kibocommerce/devcenter-behavior-modal
v0.0.6
Published
This is a React component for use in Mozu.DevCenterUI to control the Kibo Application Behaviors
Downloads
12
Readme
This is a React component for use in Mozu.DevCenterUI to control the Kibo Application Behaviors
Usage in DevCenter
Component is published to NPM and loaded onto DevCenter using CDN unpkg.com
- Build component
npm run build
- Publish component
npm publish
Component Props
interface AppBehaviorModalProps {
behaviorCategories: BehaviorCategory[]; // List of all Kibo Application behaviors
selectedBehaviors: SelectedBehavior[]; // List of current behaviors for this application
behaviorTemplates?: BehaviorTemplate[]; // List of Behavior pre-sets
onBehaviorSave: (
selectedBehaviors: SelectedBehavior[]
) => void; // Callback when modal save button is clicked
onCancel?: () => void; // Callback when modal close button is clicked
}
Utils
Two helper methods are exported to the global window for use in Ext.JS
To Unmount and close the Modal
window['react-behavior-moda'].closeBehaviorModal()
To Mount and display the Component, pass component props to showBehaviorModal
window['react-behavior-moda'].showBehaviorModal(props)