File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ export interface TextProps extends ViewProps<QLabelSignals> {
7
7
children ?: string | number ;
8
8
wordWrap ?: boolean ;
9
9
scaledContents ?: boolean ;
10
+ openExternalLinks ?: boolean ;
10
11
}
11
12
12
13
/**
@@ -26,6 +27,9 @@ export const setTextProps = (
26
27
} ,
27
28
set scaledContents ( scaled : boolean ) {
28
29
widget . setProperty ( "scaledContents" , scaled ) ;
30
+ } ,
31
+ set openExternalLinks ( shouldOpenExternalLinks : boolean ) {
32
+ widget . setProperty ( "openExternalLinks" , shouldOpenExternalLinks ) ;
29
33
}
30
34
} ;
31
35
Object . assign ( setter , newProps ) ;
Original file line number Diff line number Diff line change 5
5
Window ,
6
6
View ,
7
7
AnimatedImage ,
8
- ComboBox
8
+ ComboBox ,
9
+ Text
9
10
} from "./index" ;
10
11
import { QIcon , QVariant , QPushButtonSignals } from "@nodegui/nodegui" ;
11
12
import { useEventHandler } from "./hooks" ;
@@ -31,6 +32,13 @@ const App = () => {
31
32
return (
32
33
< Window >
33
34
< View style = { containerStyle } >
35
+ < Text openExternalLinks = { true } >
36
+ { `<a
37
+ style="color: white"
38
+ href="https://react.nodegui.org/docs/guides/getting-started/">
39
+ docs
40
+ </a>` }
41
+ </ Text >
34
42
< View on = { { } } >
35
43
< Button on = { handler } style = { buttonStyle } text = { "Hello" } />
36
44
< Button style = { buttonStyle } text = { "World" } />
You can’t perform that action at this time.
0 commit comments