UNPKG

rn-base-components

Version:
22 lines (18 loc) 594 B
import React, {memo} from 'react'; import styled from 'styled-components/native'; import AppView from './AppView'; import KEY from './Key'; function AppButton(props) { const {KEY_WORD_STYLE} = KEY; const {children, onPressIn = () => {}, onPress = () => {}, hitSlop} = props; return ( <AppButtonComponent onPressIn={onPressIn} onPress={onPress} hitSlop={hitSlop && KEY_WORD_STYLE.hitSlop}> <AppView {...props}>{children}</AppView> </AppButtonComponent> ); } export default memo(AppButton); const AppButtonComponent = styled.TouchableWithoutFeedback``;