### What problem does this PR solve? Fix: Fixed the issue that the condition of deleting the classification operator cannot be connected anymore #3221 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
33 lines
730 B
TypeScript
33 lines
730 B
TypeScript
export type OutputType = {
|
|
title: string;
|
|
type?: string;
|
|
};
|
|
|
|
type OutputProps = {
|
|
list: Array<OutputType>;
|
|
};
|
|
|
|
export function transferOutputs(outputs: Record<string, any>) {
|
|
return Object.entries(outputs).map(([key, value]) => ({
|
|
title: key,
|
|
type: value?.type,
|
|
}));
|
|
}
|
|
|
|
export function Output({ list }: OutputProps) {
|
|
return (
|
|
<section className="space-y-2">
|
|
<div>Output</div>
|
|
<ul>
|
|
{list.map((x, idx) => (
|
|
<li
|
|
key={idx}
|
|
className="bg-background-highlight text-background-checked rounded-sm px-2 py-1"
|
|
>
|
|
{x.title}: <span className="text-text-sub-title">{x.type}</span>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
</section>
|
|
);
|
|
}
|