@bpmn-io/diagram-js-ui
[![CI](https://github.com/bpmn-io/diagram-js-ui/actions/workflows/CI.yml/badge.svg)](https://github.com/bpmn-io/diagram-js-ui/actions/workflows/CI.yml)
Last updated 2 years ago by nikku .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install @bpmn-io/diagram-js-ui 
SYNC missed versions from official npm registry.

diagram-js-ui

CI

A wrapper around htm/preact that exposes components for building reactive HTML widgets in the context of diagram-js and extensions.

Usage

This module is available through diagram-js/lib/ui. Use it to create and mount your Preact components and render them through the htm utility.

// MyService.js
import { render, html } from 'diagram-js/lib/ui';
import MyCounter from './MyCounter';

export default function MyService() {
  const parentElement = document.createElement('div');

  render(html`<${MyCounter} />`, parentElement);
}
// MyCounter.js
import { useState, html } from 'diagram-js/lib/ui';

export default function MyCounter(props) {
  const counter = useState(0);

  return html`
    <div>Counter: ${counter}</div>
  `;
}

Build and Run

# install all dependencies
npm install

# lint and build the library
npm run all

License

MIT

Current Tags

  • 0.2.2                                ...           latest (2 years ago)

5 Versions

  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (13)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |