Skip to content

Latest commit

 

History

History
60 lines (46 loc) · 1.21 KB

README.md

File metadata and controls

60 lines (46 loc) · 1.21 KB

Convoworks Intent Model Editor

Intent and entity editors for the Convoworks framework

NPM JavaScript Style Guide

Install

npm

npm install --save @zef-dev/convoworks-intent-model-editor

yarn

yarn add @zef-dev/convoworks-intent-model-editor

Usage

React example

import React, { Component } from 'react'
import {
  IntentEditor,
  EntityEditor
} from '@zef-dev/convoworks-intent-model-editor'
import '@zef-dev/convoworks-intent-model-editor/dist/index.css'

class IntentExample extends Component {
  render() {
    return (
      <IntentEditor
        intent={{}} // object
        entities={[]} // array
        systemEntities={[]} // array
        onUpdate={fn} // function
      />
    )
  }
}

class EntityExample extends Component {
  render() {
    return (
      <EntityEditor
        entity={{}} // object
        onUpdate={fn} // function 
      />
    )
  }
}

License

MIT © zef-dev