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

13 lines
449 B
TypeScript

import { ComponentTypes, StringSelectMenu } from "oceanic.js";
import { childrenToArray } from "./utils";
export type StringSelectProps = Omit<StringSelectMenu, "type" | "options"> & { children: StringSelectMenu["options"]; };
export function StringSelect({ children, ...props }: StringSelectProps): StringSelectMenu {
return {
type: ComponentTypes.STRING_SELECT,
options: childrenToArray(children),
...props
};
}