add JSX components v2

This commit is contained in:
nin0 2025-05-15 07:10:53 -04:00
parent b5dd0ed413
commit 4b1227149f
Signed by: nin0
SSH key fingerprint: SHA256:NOoDnFVvZNFvqfXCIhzr6oCTDImZAbTTuyAysZ8Ufk8
25 changed files with 1080 additions and 3 deletions

View file

@ -0,0 +1,11 @@
import { ComponentTypes, ThumbnailComponent } from "oceanic.js";
export type ThumbnailProps = Omit<ThumbnailComponent, "type" | "media"> & { children: ThumbnailComponent["media"] };
export function Thumbnail(props: ThumbnailProps): ThumbnailComponent {
return {
type: ComponentTypes.THUMBNAIL,
media: props.children,
...props
};
}