1- import { QScrollArea } from "@nodegui/nodegui" ;
1+ import { QScrollArea , NodeWidget } from "@nodegui/nodegui" ;
22import { ViewProps , setProps as setViewProps } from "../View/RNView" ;
3- import { ReactElement } from "react " ;
3+ import { RNWidget } from "../config " ;
44
5- export class RNScrollArea extends QScrollArea {
5+ export class RNScrollArea extends QScrollArea implements RNWidget {
6+ removeChild ( child : NodeWidget ) : void {
7+ throw new Error ( "Method not implemented." ) ;
8+ //TODO: IMPLEMENT THIS
9+ }
10+ appendInitialChild ( child : NodeWidget ) : void {
11+ this . setWidget ( child ) ;
12+ }
13+ appendChild ( child : NodeWidget ) : void {
14+ this . appendInitialChild ( child ) ;
15+ }
16+ insertBefore ( child : NodeWidget , beforeChild : NodeWidget ) : void {
17+ this . appendInitialChild ( child ) ;
18+ }
619 static tagName = "scrollarea" ;
720}
821export interface ScrollAreaProps extends ViewProps {
9- children ?: ReactElement ;
22+ // TODO add props
1023}
1124
1225export const setProps = (
@@ -15,10 +28,7 @@ export const setProps = (
1528 oldProps : ScrollAreaProps
1629) => {
1730 const setter : ScrollAreaProps = {
18- set children ( childWidget : ReactElement ) {
19- console . log ( childWidget , "childWidget" ) ;
20- // widget.setWidget(childWidget);
21- }
31+ //TODO add props
2232 } ;
2333 Object . assign ( setter , newProps ) ;
2434 setViewProps ( widget , newProps , oldProps ) ;
0 commit comments