66 StyleSheet ,
77 StyleProp ,
88 ViewStyle ,
9- View ,
109} from 'react-native' ;
1110
1211import createNativeWrapper from '../handlers/createNativeWrapper' ;
@@ -21,7 +20,6 @@ import {
2120 NativeViewGestureHandlerPayload ,
2221 NativeViewGestureHandlerProps ,
2322} from '../handlers/NativeViewGestureHandler' ;
24- import { splitStyleProp } from './splitStyleProp' ;
2523
2624export interface RawButtonProps extends NativeViewGestureHandlerProps {
2725 /**
@@ -65,7 +63,6 @@ export interface RawButtonProps extends NativeViewGestureHandlerProps {
6563 * Set this to true if you don't want the system to play sound when the button is pressed.
6664 */
6765 touchSoundDisabled ?: boolean ;
68- style ?: StyleProp < ViewStyle > ;
6966}
7067
7168export interface BaseButtonProps extends RawButtonProps {
@@ -87,6 +84,7 @@ export interface BaseButtonProps extends RawButtonProps {
8784 * method.
8885 */
8986 onActiveStateChange ?: ( active : boolean ) => void ;
87+ style ?: StyleProp < ViewStyle > ;
9088 testID ?: string ;
9189
9290 /**
@@ -220,22 +218,15 @@ export class BaseButton extends React.Component<BaseButtonProps> {
220218 } ;
221219
222220 render ( ) {
223- const { rippleColor, style, ...rest } = this . props ;
224-
225- const { outerStyles, innerStyles, restStyles } = splitStyleProp ( style ) ;
221+ const { rippleColor, ...rest } = this . props ;
226222
227223 return (
228- < View style = { outerStyles } >
229- < View style = { innerStyles } >
230- < RawButton
231- rippleColor = { processColor ( rippleColor ) }
232- style = { restStyles }
233- { ...rest }
234- onGestureEvent = { this . onGestureEvent }
235- onHandlerStateChange = { this . onHandlerStateChange }
236- />
237- </ View >
238- </ View >
224+ < RawButton
225+ rippleColor = { processColor ( rippleColor ) }
226+ { ...rest }
227+ onGestureEvent = { this . onGestureEvent }
228+ onHandlerStateChange = { this . onHandlerStateChange }
229+ />
239230 ) ;
240231 }
241232}
0 commit comments