@helpwave/hightide-native 0.9.0 → 0.9.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.
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "access": "public"
11
11
  },
12
12
  "license": "AGPL-3.0-only",
13
- "version": "0.9.0",
13
+ "version": "0.9.1",
14
14
  "type": "module",
15
15
  "files": [
16
16
  "src"
@@ -2,7 +2,8 @@ import { forwardRef, useMemo, useState } from 'react'
2
2
  import {
3
3
  Pressable,
4
4
  View,
5
- type PressableProps
5
+ type PressableProps,
6
+ type TextProps
6
7
  } from 'react-native'
7
8
 
8
9
  import type { ColorPairToken } from '@helpwave/hightide-design/theme-tokens'
@@ -43,6 +44,7 @@ export type ButtonProps = Omit<PressableProps, 'children' | 'style'> & {
43
44
  style?: StyleOverwrite<ButtonState, ButtonStyle>,
44
45
  stateLayerStyle?: StyleOverwrite<ButtonState, ButtonStyle>,
45
46
  textStyle?: StyleOverwrite<ButtonState, ButtonTextStyle>,
47
+ textProps?: Omit<TextProps, 'style'>,
46
48
  iconStyle?: StyleOverwrite<ButtonState, IconStyle>,
47
49
  }
48
50
 
@@ -57,6 +59,7 @@ export const Button = forwardRef<React.ComponentRef<typeof Pressable>, ButtonPro
57
59
  style,
58
60
  stateLayerStyle,
59
61
  textStyle,
62
+ textProps,
60
63
  iconStyle,
61
64
  hitSlop: providedHitSlop,
62
65
  onLayout: providedOnLayout,
@@ -120,7 +123,7 @@ export const Button = forwardRef<React.ComponentRef<typeof Pressable>, ButtonPro
120
123
  {leadingIcon !== undefined && (
121
124
  <ThemedIcon icon={leadingIcon} />
122
125
  )}
123
- <ThemedText>{children}</ThemedText>
126
+ <ThemedText numberOfLines={1} ellipsizeMode="tail" {...textProps}>{children}</ThemedText>
124
127
  {trailingIcon !== undefined && (
125
128
  <ThemedIcon icon={trailingIcon} />
126
129
  )}