UNPKG

react-native-plain-calendar

Version:
19 lines (18 loc) 668 B
import * as React from 'react'; import { Text, View } from 'react-native'; import { Touchable } from '../Touchable/Touchable'; import { s } from './styles'; export function HeaderButton({ type, onPress, children, headerButtonStyle, HeaderButtonComponent, }) { if (HeaderButtonComponent) { return <HeaderButtonComponent onPress={onPress} type={type}/>; } const isNext = type === 'next'; return (<View style={[ s.headerContainers, isNext ? s.headerNextButton : s.headerPrevButton, ]}> <Touchable onPress={onPress} style={headerButtonStyle}> <Text>{children}</Text> </Touchable> </View>); }