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> {
77 children ?: string | number ;
88 wordWrap ?: boolean ;
99 scaledContents ?: boolean ;
10+ openExternalLinks ?: boolean ;
1011}
1112
1213/**
@@ -26,6 +27,9 @@ export const setTextProps = (
2627 } ,
2728 set scaledContents ( scaled : boolean ) {
2829 widget . setProperty ( "scaledContents" , scaled ) ;
30+ } ,
31+ set openExternalLinks ( shouldOpenExternalLinks : boolean ) {
32+ widget . setProperty ( "openExternalLinks" , shouldOpenExternalLinks ) ;
2933 }
3034 } ;
3135 Object . assign ( setter , newProps ) ;
Original file line number Diff line number Diff line change 55 Window ,
66 View ,
77 AnimatedImage ,
8- ComboBox
8+ ComboBox ,
9+ Text
910} from "./index" ;
1011import { QIcon , QVariant , QPushButtonSignals } from "@nodegui/nodegui" ;
1112import { useEventHandler } from "./hooks" ;
@@ -31,6 +32,13 @@ const App = () => {
3132 return (
3233 < Window >
3334 < 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 >
3442 < View on = { { } } >
3543 < Button on = { handler } style = { buttonStyle } text = { "Hello" } />
3644 < Button style = { buttonStyle } text = { "World" } />
You can’t perform that action at this time.
0 commit comments