Skip to content

Commit 8185e0d

Browse files
committed
feat(tre): add onPress support in native props
1 parent 2148190 commit 8185e0d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

packages/transient-render-engine/src/helper-types.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ export type StylessReactNativeTextProps = Omit<TextProps, 'style'>;
3030
/**
3131
* React Native `View` props, minus the `style` prop.
3232
*/
33-
export type StylessReactNativeViewProps = Omit<ViewProps, 'style'>;
33+
export type StylessReactNativeViewProps = Omit<ViewProps, 'style'> & {
34+
onPress?: () => void;
35+
};
3436

3537
/**
3638
* An intersection between React Native `View` and `Text` props, minus the
3739
* `style` prop.
3840
*/
39-
export type StylessReactNativeProps = Omit<ReactNativeProps, 'style'>;
41+
export type StylessReactNativeProps = Omit<ReactNativeProps, 'style'> & {
42+
onPress?: () => void;
43+
};
4044

4145
/**
4246
* An object containing props targetting either `Text`, `View`, or both.

0 commit comments

Comments
 (0)