UI Component Interfaces #16
Replies: 1 comment
|
Example: interface IDaggerProps {
DagFuncList: any[] | (() => any[]) | (() => Promise<any[]>),
LoadDagList: any[] | (() => any[]) | (() => Promise<any[]>);
onSave: (...args: any) => any | void;
onloadSavedDag: (...args: any) => any | void;
loadParamsList: (...args: any) => any | void;
}I'll provide you with documentation for the TypeScript interface Interface: IDaggerPropsThe Properties:
Usage:You can use the When implementing a component that consumes Here's a sample usage of import React from 'react';
interface IDaggerProps {
DagFuncList: any[] | (() => any[]) | (() => Promise<any[]>),
LoadDagList: any[] | (() => any[]) | (() => Promise<any[]>);
onSave: (...args: any) => any | void;
onloadSavedDag: (...args: any) => any | void;
loadParamsList: (...args: any) => any | void;
}
const DAGComponent: React.FC<IDaggerProps> = (props) => {
// Component implementation here
return (
<div>
{/* Render the DAG component using props */}
</div>
);
}
export default DAGComponent;In the above example, the Remember to replace the comments with your actual component logic and rendering. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This is to collect and discuss UI interfaces.
Would like to get some definition of the interface of what we call a "UI-component". For example, if we think OO:
Where
ChoiceUI, if I write it as a python function, would look like this:All reactions