migrate to cv2 jsx
This commit is contained in:
parent
6858283ecc
commit
dcd22a9d8c
18 changed files with 101 additions and 122 deletions
|
@ -3,12 +3,12 @@ import { ComponentTypes, TextDisplayComponent } from "oceanic.js";
|
|||
import { childrenToString } from "./utils";
|
||||
|
||||
export interface TextDisplayProps {
|
||||
children?: any;
|
||||
children: any;
|
||||
id?: number;
|
||||
}
|
||||
|
||||
export function TextDisplay({ children, id }: TextDisplayProps): TextDisplayComponent {
|
||||
children = childrenToString("TextDisplay", children);
|
||||
children = childrenToString("TextDisplay", children)!;
|
||||
if (!children) {
|
||||
throw new Error("TextDisplay requires at least one child");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue