create-expo-stack 2.10.5-next.0aafcb2 → 2.10.5-next.0aee640

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.
@@ -2,13 +2,12 @@ import { forwardRef } from 'react';
2
2
  import { StyleSheet, Text, TouchableOpacity, TouchableOpacityProps } from 'react-native';
3
3
 
4
4
  type ButtonProps = {
5
- onPress?: TouchableOpacityProps['onPress'];
6
5
  title?: string;
7
6
  } & TouchableOpacityProps;
8
7
 
9
- export const Button = forwardRef<TouchableOpacity, ButtonProps>(({ onPress, title }, ref) => {
8
+ export const Button = forwardRef<TouchableOpacity, ButtonProps>(({ title, ...touchableProps }, ref) => {
10
9
  return (
11
- <TouchableOpacity ref={ref} style={styles.button} onPress={onPress}>
10
+ <TouchableOpacity ref={ref} {...touchableProps} style={[styles.button, touchableProps.style]}>
12
11
  <Text style={styles.buttonText}>{title}</Text>
13
12
  </TouchableOpacity>
14
13
  );
@@ -1,14 +1,13 @@
1
1
  import { forwardRef } from 'react';
2
2
  import { Text, TouchableOpacity, TouchableOpacityProps } from 'react-native';
3
3
 
4
- interface ButtonProps extends TouchableOpacityProps {
5
- onPress?: () => void;
4
+ type ButtonProps = {
6
5
  title: string;
7
- }
6
+ } & TouchableOpacityProps;
8
7
 
9
- export const Button = forwardRef<TouchableOpacity, ButtonProps>(({ onPress, title }, ref) => {
8
+ export const Button = forwardRef<TouchableOpacity, ButtonProps>(({ title, ...touchableProps }, ref) => {
10
9
  return (
11
- <TouchableOpacity ref={ref} className={styles.button} onPress={onPress}>
10
+ <TouchableOpacity ref={ref} {...touchableProps} className={`${styles.button} ${touchableProps.className}`}>
12
11
  <Text className={styles.buttonText}>{title}</Text>
13
12
  </TouchableOpacity>
14
13
  );
@@ -2,13 +2,12 @@ import { forwardRef } from 'react';
2
2
  import { StyleSheet, Text, TouchableOpacity, TouchableOpacityProps } from 'react-native';
3
3
 
4
4
  type ButtonProps = {
5
- onPress?: TouchableOpacityProps['onPress'];
6
5
  title?: string;
7
6
  } & TouchableOpacityProps;
8
7
 
9
- export const Button = forwardRef<TouchableOpacity, ButtonProps>(({ onPress, title }, ref) => {
8
+ export const Button = forwardRef<TouchableOpacity, ButtonProps>(({ title, ...touchableProps }, ref) => {
10
9
  return (
11
- <TouchableOpacity ref={ref} style={styles.button} onPress={onPress}>
10
+ <TouchableOpacity ref={ref} {...touchableProps} style={[styles.button, touchableProps.style]}>
12
11
  <Text style={styles.buttonText}>{title}</Text>
13
12
  </TouchableOpacity>
14
13
  );
@@ -1,12 +1,16 @@
1
1
  import { forwardRef } from 'react';
2
- import { TouchableOpacity } from 'react-native';
2
+ import { TouchableOpacity, TouchableOpacityProps } from 'react-native';
3
3
  import { Text, makeStyles } from 'theme';
4
4
 
5
- export const Button = forwardRef<TouchableOpacity, ButtonProps>(({ onPress, title }, ref) => {
5
+ type ButtonProps = {
6
+ title?: string;
7
+ } & TouchableOpacityProps;
8
+
9
+ export const Button = forwardRef<TouchableOpacity, ButtonProps>(({ title, ...touchableProps }, ref) => {
6
10
  const styles = useStyles();
7
11
 
8
12
  return (
9
- <TouchableOpacity style={styles.button} onPress={onPress}>
13
+ <TouchableOpacity ref={ref} {...touchableProps} style={[styles.button, touchableProps.style]}>
10
14
  <Text variant="body" textAlign="center" color="white" fontWeight="600">
11
15
  {title}
12
16
  </Text>
@@ -1,12 +1,17 @@
1
1
  import { forwardRef } from 'react';
2
- import { Text, TouchableOpacity } from 'react-native';
2
+ import { Text, TouchableOpacity, TouchableOpacityProps } from 'react-native';
3
3
  import { useStyles } from 'react-native-unistyles';
4
4
 
5
- export const Button = forwardRef<TouchableOpacity, ButtonProps>(({ onPress, title }, ref) => {
5
+ type ButtonProps = {
6
+ title?: string;
7
+ } & TouchableOpacityProps;
8
+
9
+
10
+ export const Button = forwardRef<TouchableOpacity, ButtonProps>(({ title, ...touchableProps }, ref) => {
6
11
  const { theme } = useStyles();
7
12
 
8
13
  return (
9
- <TouchableOpacity style={theme.components.button} onPress={onPress}>
14
+ <TouchableOpacity ref={ref} {...touchableProps} style={[theme.components.button, touchableProps.style]}>
10
15
  <Text style={theme.components.buttonText}>{title}</Text>
11
16
  </TouchableOpacity>
12
17
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-expo-stack",
3
- "version": "2.10.5-next.0aafcb2",
3
+ "version": "2.10.5-next.0aee640",
4
4
  "description": "CLI tool to initialize a React Native application with Expo",
5
5
  "repository": {
6
6
  "type": "git",