migrate to cv2 jsx
This commit is contained in:
parent
6858283ecc
commit
dcd22a9d8c
18 changed files with 101 additions and 122 deletions
|
@ -3,14 +3,14 @@ import { ButtonComponent, ComponentTypes, SectionComponent, TextDisplayComponent
|
|||
import { childrenToArray } from "./utils";
|
||||
|
||||
export interface SectionProps {
|
||||
children: TextDisplayComponent[]
|
||||
children: TextDisplayComponent[];
|
||||
accessory: ThumbnailComponent | ButtonComponent;
|
||||
}
|
||||
|
||||
export function Section(props: SectionProps): SectionComponent {
|
||||
export function Section({ children, ...props }: SectionProps): SectionComponent {
|
||||
return {
|
||||
type: ComponentTypes.SECTION,
|
||||
components: childrenToArray(props.children),
|
||||
components: childrenToArray(children),
|
||||
...props
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue