Skip to content

Commit

Permalink
fix: dom type render failed bug in API component (#1507)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript authored Feb 24, 2023
1 parent 09db565 commit 33f70a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/normal/src/Foo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const Foo: FC<{
onClick: (e?: MouseEvent) => void;
children: React.ReactNode;
onConfirm: (output: { children: any[] }) => void;
dom: HTMLElement;
}> = (props) => {
return <>{props.title}</>;
};
Expand Down
2 changes: 1 addition & 1 deletion src/client/theme-default/builtins/API/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const HANDLERS = {
},
// FIXME: extract real type
dom(prop: any) {
return `<${prop.$$__body.id} />`;
return prop.className || 'DOM';
},

// special handlers
Expand Down

0 comments on commit 33f70a6

Please sign in to comment.