mirror of
https://github.com/wassname/talk.git
synced 2026-07-13 17:45:56 +08:00
13 lines
252 B
TypeScript
13 lines
252 B
TypeScript
import { noop } from "lodash";
|
|
import { ReactElement } from "react";
|
|
|
|
export default function createNodeMock(element: ReactElement<any>) {
|
|
if (element.type === "div") {
|
|
return {
|
|
innerHtml: "",
|
|
focus: noop,
|
|
};
|
|
}
|
|
return null;
|
|
}
|