File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 11import { registerComponent } from "../config" ;
22import { QPixmap , QLabelEvents , AspectRatioMode } from "@nodegui/nodegui" ;
3- import { ViewProps , setProps as setViewProps } from "../View" ;
43import { ImageLabel } from "./ImageLabel" ;
5- interface ImageProps extends ViewProps {
4+ import { TextProps , setProps as setTextProps } from "../Text" ;
5+ interface ImageProps extends TextProps {
66 src ?: string ;
77 aspectRatioMode ?: AspectRatioMode ;
88}
@@ -27,7 +27,7 @@ const setProps = (
2727 }
2828 } ;
2929 Object . assign ( setter , newProps ) ;
30- setViewProps ( widget , newProps , oldProps ) ;
30+ setTextProps ( widget , newProps , oldProps ) ;
3131} ;
3232
3333export const Image = registerComponent < ImageProps > ( {
Original file line number Diff line number Diff line change @@ -2,12 +2,16 @@ import { registerComponent } from "../config";
22import { QLabel } from "@nodegui/nodegui" ;
33import { ViewProps , setProps as setViewProps } from "../View" ;
44
5- interface TextProps extends ViewProps {
5+ export interface TextProps extends ViewProps {
66 children ?: string | number ;
77 wordWrap ?: boolean ;
88}
99
10- const setProps = ( widget : QLabel , newProps : TextProps , oldProps : TextProps ) => {
10+ export const setProps = (
11+ widget : QLabel ,
12+ newProps : TextProps ,
13+ oldProps : TextProps
14+ ) => {
1115 const setter : TextProps = {
1216 set children ( text : string | number ) {
1317 widget . setText ( text ) ;
Original file line number Diff line number Diff line change 11export { Renderer } from "./renderer" ;
22export { View } from "./components/View" ;
3+ export { Window } from "./components/Window" ;
34export { Text } from "./components/Text" ;
45export { Button } from "./components/Button" ;
56export { CheckBox } from "./components/CheckBox" ;
@@ -8,5 +9,4 @@ export { PlainTextEdit } from "./components/PlainTextEdit";
89export { ProgressBar } from "./components/ProgressBar" ;
910export { RadioButton } from "./components/RadioButton" ;
1011export { Image } from "./components/Image" ;
11- export { Window } from "./components/Window" ;
1212export { useEventHandler } from "./hooks" ;
You can’t perform that action at this time.
0 commit comments