migrate to cv2 jsx
This commit is contained in:
parent
6858283ecc
commit
dcd22a9d8c
18 changed files with 101 additions and 122 deletions
|
@ -2,12 +2,12 @@ import { ComponentTypes, StringSelectMenu } from "oceanic.js";
|
|||
|
||||
import { childrenToArray } from "./utils";
|
||||
|
||||
export type StringSelectProps = Omit<StringSelectMenu, "type" | "options"> & { children: StringSelectMenu["options"] };
|
||||
export type StringSelectProps = Omit<StringSelectMenu, "type" | "options"> & { children: StringSelectMenu["options"]; };
|
||||
|
||||
export function StringSelect(props: StringSelectProps): StringSelectMenu {
|
||||
export function StringSelect({ children, ...props }: StringSelectProps): StringSelectMenu {
|
||||
return {
|
||||
type: ComponentTypes.STRING_SELECT,
|
||||
options: childrenToArray(props.children),
|
||||
options: childrenToArray(children),
|
||||
...props
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue