import React , { FunctionComponent } from "react" ; import { View , ViewStyle } from "react-native" ; import { RectButton as NativeRectButton , RectButtonProps , } from "react-native-gesture-handler" ; import { useStyle } from "../../styles" ; param props constructor export const RectButton = ( props ) => { const style = useStyle ( ) ; const { children , style : propStyle , rippleColor , ... rest } = props ; const { borderRadius , borderTopLeftRadius , borderTopRightRadius , borderBottomLeftRadius , borderBottomRightRadius , borderBottomColor , borderBottomWidth , borderLeftColor , borderLeftWidth , borderRightColor , borderRightWidth , borderTopColor , borderTopWidth , borderColor , borderWidth , borderStyle , margin , marginTop , marginBottom , marginLeft , marginRight , flexGrow , flex , flexBasis , flexShrink , flexWrap , backgroundColor , ... restStyle } = propStyle ?? { } ; return ( < View style = { { overflow : "hidden" , borderRadius , borderTopLeftRadius , borderTopRightRadius , borderBottomLeftRadius , borderBottomRightRadius , borderBottomColor , borderBottomWidth , borderLeftColor , borderLeftWidth , borderRightColor , borderRightWidth , borderTopColor , borderTopWidth , borderColor , borderWidth , borderStyle , margin , marginTop , marginBottom , marginLeft , marginRight , flexGrow , flex , flexBasis , flexShrink , flexWrap , backgroundColor , } } > < NativeRectButton style = { restStyle } rippleColor = { rippleColor || style . get ( "color-rect-button-default-ripple" ) . color } underlayColor = { style . get ( "color-rect-button-default-underlay" ) . color } activeOpacity = { 0.055 } { ... rest } > { children } < /NativeRectButton> < /View>); } ;