diff --git a/src/components/Text/RNText.ts b/src/components/Text/RNText.ts index 7fa39902..717c7a7f 100644 --- a/src/components/Text/RNText.ts +++ b/src/components/Text/RNText.ts @@ -1,4 +1,4 @@ -import { QLabel, NodeWidget, QLabelSignals } from '@nodegui/nodegui'; +import { QLabel, NodeWidget, QLabelSignals, TextInteractionFlag } from '@nodegui/nodegui'; import { ViewProps, setViewProps } from '../View/RNView'; import { RNWidget } from '../config'; import { throwUnsupported } from '../../utils/helpers'; @@ -8,6 +8,7 @@ export interface TextProps extends ViewProps { wordWrap?: boolean; scaledContents?: boolean; openExternalLinks?: boolean; + textInteractionFlags?: TextInteractionFlag; } /** @@ -33,6 +34,9 @@ export const setTextProps = ( set openExternalLinks(shouldOpenExternalLinks: boolean) { widget.setProperty('openExternalLinks', shouldOpenExternalLinks); }, + set textInteractionFlags(interactionFlag: TextInteractionFlag){ + widget.setProperty('textInteractionFlags', interactionFlag); + } }; Object.assign(setter, newProps); setViewProps(widget, newProps, oldProps); diff --git a/website/docs/api/interfaces/textprops.md b/website/docs/api/interfaces/textprops.md index 361746e3..f1ffdcdc 100644 --- a/website/docs/api/interfaces/textprops.md +++ b/website/docs/api/interfaces/textprops.md @@ -35,6 +35,7 @@ sidebar_label: "TextProps" * [size](textprops.md#optional-size) * [style](textprops.md#optional-style) * [styleSheet](textprops.md#optional-stylesheet) +* [textInteractionFlags](textprops.md#optional-textinteractionflags) * [visible](textprops.md#optional-visible) * [windowFlags](textprops.md#optional-windowflags) * [windowIcon](textprops.md#optional-windowicon) @@ -204,6 +205,13 @@ Sets the property that holds the widget's style sheet. [QWidget: setStyleSheet]( ___ +### `Optional` textInteractionFlags + +• **textInteractionFlags**? : *undefined | [TextInteractionFlag](https://docs.nodegui.org/docs/api/generated/enums/textinteractionflag)* + +Sets the widget's interaction flag +___ + ### `Optional` visible • **visible**? : *undefined | false | true*