File tree 3 files changed +10
-6
lines changed
3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
1
import { registerComponent } from "../config" ;
2
2
import { QPixmap , QLabelEvents , AspectRatioMode } from "@nodegui/nodegui" ;
3
- import { ViewProps , setProps as setViewProps } from "../View" ;
4
3
import { ImageLabel } from "./ImageLabel" ;
5
- interface ImageProps extends ViewProps {
4
+ import { TextProps , setProps as setTextProps } from "../Text" ;
5
+ interface ImageProps extends TextProps {
6
6
src ?: string ;
7
7
aspectRatioMode ?: AspectRatioMode ;
8
8
}
@@ -27,7 +27,7 @@ const setProps = (
27
27
}
28
28
} ;
29
29
Object . assign ( setter , newProps ) ;
30
- setViewProps ( widget , newProps , oldProps ) ;
30
+ setTextProps ( widget , newProps , oldProps ) ;
31
31
} ;
32
32
33
33
export const Image = registerComponent < ImageProps > ( {
Original file line number Diff line number Diff line change @@ -2,12 +2,16 @@ import { registerComponent } from "../config";
2
2
import { QLabel } from "@nodegui/nodegui" ;
3
3
import { ViewProps , setProps as setViewProps } from "../View" ;
4
4
5
- interface TextProps extends ViewProps {
5
+ export interface TextProps extends ViewProps {
6
6
children ?: string | number ;
7
7
wordWrap ?: boolean ;
8
8
}
9
9
10
- const setProps = ( widget : QLabel , newProps : TextProps , oldProps : TextProps ) => {
10
+ export const setProps = (
11
+ widget : QLabel ,
12
+ newProps : TextProps ,
13
+ oldProps : TextProps
14
+ ) => {
11
15
const setter : TextProps = {
12
16
set children ( text : string | number ) {
13
17
widget . setText ( text ) ;
Original file line number Diff line number Diff line change 1
1
export { Renderer } from "./renderer" ;
2
2
export { View } from "./components/View" ;
3
+ export { Window } from "./components/Window" ;
3
4
export { Text } from "./components/Text" ;
4
5
export { Button } from "./components/Button" ;
5
6
export { CheckBox } from "./components/CheckBox" ;
@@ -8,5 +9,4 @@ export { PlainTextEdit } from "./components/PlainTextEdit";
8
9
export { ProgressBar } from "./components/ProgressBar" ;
9
10
export { RadioButton } from "./components/RadioButton" ;
10
11
export { Image } from "./components/Image" ;
11
- export { Window } from "./components/Window" ;
12
12
export { useEventHandler } from "./hooks" ;
You can’t perform that action at this time.
0 commit comments