0.0.6 • Published 2 years ago

@kibocommerce/devcenter-behavior-modal v0.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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

  1. Build component
npm run build
  1. 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)
0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago