UNPKG

@prosperitainova/dumbo-react-native

Version:
43 lines 1.59 kB
import React from 'react'; import { GestureResponderEvent, StyleProp, ViewStyle } from 'react-native'; import { TextTypes } from '../Text'; /** Props for InlineLink component */ export type InlineLinkProps = { /** Text to render */ text: string; /** Text type to render (Standard is default) */ textType?: TextTypes; /** onPress event */ onPress?: (event: GestureResponderEvent) => void; /** onLongPress event */ onLongPress?: (event: GestureResponderEvent) => void; /** Indicate if keyboard should be dismissed onPress */ dismissKeyboardOnPress?: boolean; /** Indicate if links are rendered on dark mode */ forceDarkMode?: boolean; /** Style to set on the item */ style?: StyleProp<ViewStyle>; }; /** * InlineLink component * Link for using in inline with other text. * * To use import React Native Text wrapper `import { Text as ReactText } from 'react-native';` * Use `Text` from the Carbon package. * Then use something like: * ```javascript * <ReactText> * <Text text="Regular text before link. You can click on " /> * <InlineLink text="this link" onPress={() => openLink('https://carbondesignsystem.com')} /> * <Text text=" which will open the link." /> * </ReactText> * ``` * * {@link https://github.com/carbon-design-system/carbon-react-native/blob/main/example/src/Views/Link.tsx | Example code} */ export declare class InlineLink extends React.Component<InlineLinkProps> { private get styles(); private onPress; render(): React.ReactNode; } //# sourceMappingURL=index.d.ts.map