apprev/components-jsx/MediaGallery.tsx
2025-05-16 06:16:52 -04:00

13 lines
463 B
TypeScript

import { ComponentTypes, MediaGalleryComponent } from "oceanic.js";
import { childrenToArray } from "./utils";
export type MediaGalleryProps = Omit<MediaGalleryComponent, "type" | "items"> & { children: MediaGalleryComponent["items"]; };
export function MediaGallery({ children, ...props }: MediaGalleryProps): MediaGalleryComponent {
return {
type: ComponentTypes.MEDIA_GALLERY,
items: childrenToArray(children),
...props
};
}