import React, { memo } from 'react' import { StyleSheet } from 'react-native' import { SvgXml } from 'react-native-svg' import type { PaginationArrowProps } from './TableTypes' // TODO(michael-adalo): improve this implementation to make it less hacky const PaginationArrow = ({ direction, theme }: PaginationArrowProps) => { if (direction === 'next') { return ( `} style={styles.icon} fill={theme.cellText.color} /> ) } else if (direction === 'previous') { return ( `} style={styles.icon} fill={theme.cellText.color} /> ) } else { throw new Error('Invalid direction') } } const styles = StyleSheet.create({ icon: { width: 20, height: 20, }, }) export default memo(PaginationArrow)