fix: customization types (#4321)
This commit is contained in:
parent
50669867c9
commit
72bef63ef6
@ -9,6 +9,7 @@ export interface BaseCustomization extends Obj {
|
||||
description?: string;
|
||||
label?: string;
|
||||
commands?: Command[];
|
||||
content?: (...props: any) => React.JSX.Element;
|
||||
}
|
||||
|
||||
export interface LabelCustomization extends BaseCustomization {
|
||||
@ -23,11 +24,16 @@ export interface CommandCustomization extends BaseCustomization {
|
||||
commands: Command[];
|
||||
}
|
||||
|
||||
export interface ComponentCustomization extends BaseCustomization {
|
||||
content: (...props: any) => React.JSX.Element;
|
||||
}
|
||||
|
||||
export type Customization =
|
||||
| BaseCustomization
|
||||
| LabelCustomization
|
||||
| CommandCustomization
|
||||
| CodeCustomization;
|
||||
| CodeCustomization
|
||||
| ComponentCustomization;
|
||||
|
||||
export default Customization;
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Types } from '@ohif/core';
|
||||
|
||||
import MeasurementItem from './MeasurementItem';
|
||||
|
||||
@ -17,9 +18,11 @@ const MeasurementTable = ({
|
||||
const amount = data.length;
|
||||
|
||||
const itemCustomization = customizationService.getCustomization('MeasurementItem', {
|
||||
id: 'MeasurementItem',
|
||||
content: MeasurementItem,
|
||||
contentProps: {},
|
||||
});
|
||||
}) as Types.Customization;
|
||||
|
||||
const CustomMeasurementItem = itemCustomization.content;
|
||||
|
||||
const onMeasurementDeleteHandler = ({ uid }) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user