@telus-uds/components-base 1.61.0 → 1.62.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,6 +24,14 @@ const propTypes = {
24
24
  * Display tooltip icon button as an inline element.
25
25
  */
26
26
  inline: PropTypes.bool,
27
+ /**
28
+ * Callback function triggered when the tooltip is pressed.
29
+ */
30
+ onPress: PropTypes.func,
31
+ /**
32
+ * The `id` of the tooltip button.
33
+ */
34
+ nativeID: PropTypes.string,
27
35
  tokens: getTokensPropType('Tooltip'),
28
36
  variant: variantProp.propType
29
37
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { View } from 'react-native'
2
+ import { View, StyleSheet, Platform } from 'react-native'
3
3
  import PropTypes from 'prop-types'
4
4
  import { useThemeTokens, applyOuterBorder } from '../ThemeProvider'
5
5
  import { a11yProps, getTokensPropType, selectSystemProps, variantProp, viewProps } from '../utils'
@@ -35,7 +35,8 @@ const TooltipButton = ({ pressableState, tokens, variant, ...rest }) => {
35
35
  applyOuterBorder(themeTokens),
36
36
  themeTokens.outerBorderWidth && {
37
37
  margin: -themeTokens.outerBorderWidth
38
- }
38
+ },
39
+ staticStyles.bubblePointerEvents
39
40
  ]}
40
41
  {...selectProps(rest)}
41
42
  >
@@ -46,6 +47,16 @@ const TooltipButton = ({ pressableState, tokens, variant, ...rest }) => {
46
47
  )
47
48
  }
48
49
 
50
+ const staticStyles = StyleSheet.create({
51
+ bubblePointerEvents: {
52
+ ...Platform.select({
53
+ web: {
54
+ pointerEvents: 'none'
55
+ }
56
+ })
57
+ }
58
+ })
59
+
49
60
  TooltipButton.propTypes = {
50
61
  ...selectedSystemPropTypes,
51
62
  /**