How to use the @ohif/ui.SimpleDialog.InputDialog function in @ohif/ui

To help you get started, weā€™ve selected a few @ohif/ui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OHIF / Viewers / extensions / cornerstone / src / init.js View on Github external
const callInputDialog = (data, event, callback) => {
    const { UIDialogService } = servicesManager.services;

    if (UIDialogService) {
      let dialogId = UIDialogService.create({
        centralize: true,
        isDraggable: false,
        content: SimpleDialog.InputDialog,
        useLastPosition: false,
        showOverlay: true,
        contentProps: {
          title: 'Enter your annotation',
          label: 'New label',
          measurementData: data ? { description: data.text } : {},
          onClose: () => UIDialogService.dismiss({ id: dialogId }),
          onSubmit: value => {
            callback(value);
            UIDialogService.dismiss({ id: dialogId });
          },
        },
      });
    }
  };

@ohif/ui

A set of React components for Medical Imaging Viewers

MIT
Latest version published 19 days ago

Package Health Score

83 / 100
Full package analysis

Similar packages