Skip to content

Commit 0af3e24

Browse files
committed
feat: update Notehing component to accept props for conditional rendering
1 parent e09ef8b commit 0af3e24

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Notehing.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
import { ReactElement } from "react";
1+
import { ReactElement, Fragment, createElement } from "react";
22

33
import { NotehingContainerProps } from "../typings/NotehingProps";
44

55
import "./ui/Notehing.css";
66

7-
export function Notehing(): ReactElement<NotehingContainerProps> | null {
7+
export function Notehing(props: NotehingContainerProps): ReactElement | null {
8+
const { isContainer, content } = props;
9+
10+
if (isContainer) {
11+
return <Fragment>{content}</Fragment>;
12+
}
13+
814
return null;
915
}

0 commit comments

Comments
 (0)