Skip to content

Commit 6caf53b

Browse files
committed
Clarify TODO
1 parent 004fd90 commit 6caf53b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

dashi/src/lib/components/DashiComponent.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ export interface DashiComponentProps extends ComponentState {
1010
}
1111

1212
export function DashiComponent({ type, ...props }: DashiComponentProps) {
13-
// TODO: find way to avoid ugly type casts here
13+
// TODO: allow for registering components via their types
14+
// and make following code generic.
15+
//
16+
// const DashiComp = Registry.getComponent(type);
17+
// return return <DashiComp {...props} />;
18+
//
1419
if (type === "Plot") {
1520
return <DashiPlot {...(props as DashiPlotProps)} />;
1621
} else if (type === "Dropdown") {

0 commit comments

Comments
 (0)